In Java, let's say I have...
let hello = 10;
Is it possible to retrieve hello's value (10) using the string reference 'hello'? Something like valueOf(....'hello'....) = 10
In Java, let's say I have...
let hello = 10;
Is it possible to retrieve hello's value (10) using the string reference 'hello'? Something like valueOf(....'hello'....) = 10
This is how you can retrive in Java. Also let is used in JavaScript not in Java.
public class Test {
public static void main(String[] args) {
String hello = "10";
int helloNum = Integer.valueOf(hello); //converting String "10" into int 10
int num = 10;
String numString = String.valueOf(num);//converting int 10 to string "10"
}
}