Computer Applications
Give the output of the following program segment:
String a="10", b="20";
int x=Integer.parseInt(a);
int y=Integer.valueOf(b);
System.out.println(x+y);
System.out.println(a+b);
Related Questions
Predict the output of the following code snippet:
char ch='B', char chr=Character.toLowerCase(ch); int n=(int)chr-10; System.out.println((char)n+"\t"+chr);The method to convert a lowercase character to uppercase is:
- String.toUpperCase( )
- Character.isUppercase( char )
- Character.toUpperCase( char )
- toUpperCase ( )
Differentiate between boxing and unboxing.
The method to convert a String to double is:
- String.toDouble()
- Double.Parsedouble()
- Double.parseDouble(String)
- Double.parseDouble()