Trending ▼   ResFinder  

ICSE Class X Notes 2025 : Computer Applications (St. Xavier's High School, Panchkula)

2 pages, 40 questions, 0 questions with responses, 0 total responses,    0    0
Piyush Narang
  
+Fave Message
 Home > piyush148904 >   F Also featured on: School Page

Formatting page ...

CLASS-10 ST. XAVIER S HIGH SCHOOL, PANCHKULA SESSION: 2024-2025 COMPUTER APPLICATIONS Wrapper Classes TERM 1 Multiple Choice Questions Correct answers are in red ink. 1. Which of these is a wrapper for data type int? a) Integer b) Long c) Byte d) Double 2. Which of these is a wrapper for simple data type char? a) Float b) Character c) String d) Integer 3.Which of the following is method of wrapper Integer for converting the value of an object into int? a) bytevalue() b) int intValue() c) Bytevalue() d) Byte Bytevalue() 4. Which of the following methods return the value as a double? a) doubleValue() b) converDouble() c) getDouble() d) getDoubleValue() 5.Which of these classes is not included in java.lang? a) Byte b) Integer c) Array d) Class 6.Which of these is a process of converting a simple data type into a class? a) type wrapping b) type conversion c) type casting d) none of the Mentioned 7.Which of the following package stores all the simple data types in java? a) lang b) java c) util d) java.packages 8. Which of these is a wrapper for simple data type float? a) float b) double c) Float d) Double 9. What will be the output of the following Java code? class increment { public static void main(String args[]) { int g = 3; System.out.print(++g * 8); } } a) 25 b) 24 c) 32 d) 33 Operator ++ has more preference than *, thus g becomes 4 and when multiplied by 8 gives 32. 10. What will be the output of the following Java program? class mainclass { public static void main(String args[]) { char a = 'A'; a++; System.out.print((int)a); } } a) 66 b) 67 c) 65 d) 64 ASCII value of A is 65, on using ++ operator character value increments by one. ********************************

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

piyush148904 chat