Java Java Basics Perfecting the Prototype Parsing Integers

Tojo Alex
PRO
Tojo Alex
Pro Student 13,331 Points

I don't understand this topic in java

This keeps on confusing me.

ParsingInts.java
String answerToLife = "42";
int answer = integer.answerToLife ;

2 Answers

Brendon Butler
Brendon Butler
4,241 Points

Simple mistake

int answer = Integer.parseInt(answerToLife);