Java Java Basics Perfecting the Prototype Parsing Integers

Nkosinolwazi Moyo
Nkosinolwazi Moyo
9,588 Points

New int variable

Don't understand here, what's wrong

ParsingInts.java
String answerToLife = "42";
Int answer = Integer.pase int ( answerToLife);

5 Answers

Nkosinolwazi Moyo
Nkosinolwazi Moyo
9,588 Points

I'm still lost, can't get it right

KRIS NIKOLAISEN
KRIS NIKOLAISEN
52,668 Points

In the video:

int age = Integer.parseInt(ageAsString);

The difference with your original post:

1) int is lowercase

2) The method is parseInt

So you'd have:

int answer = Integer.parseInt(answerToLife);