Computer Applications
Write the output of the following:
- System.out.println(Character.isUpperCase('R'));
- System.out.println(Character.toUpperCase('j'));
Related Questions
Assertion (A): Integer class can be used in the program without calling a package.
Reason (R): It belongs to the default package java.lang.
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion(A)
- Assertion (A) is true and Reason (R) is false
- Assertion (A) is false and Reason (R) is true
State the data type and value of res after the following is executed:
char ch = '9'; res= Character.isDigit(ch);Give the output of the following code:
String P = "20", Q ="19"; int a = Integer.parseInt(P); int b = Integer.valueOf(Q); System.out.println(a+""+b);Primitive data types are built in data types which are a part of the wrapper classes. These wrapper classes are encapsulated in the java.lang package. Non primitive datatypes like Scanner class are a part of the utility package for which an object needs to be created.
(a) To which package the Character and Boolean classes belong?
(b) Write the statement to access the Scanner class in the program.