0% found this document useful (0 votes)
3 views3 pages

Java Question

The document outlines a Java examination for February 2024, consisting of multiple-choice questions in Part A, short answer questions in Part B, and programming tasks in Part C. It covers various Java concepts, including data types, arrays, methods, and object-oriented programming principles. The exam is structured to assess knowledge of Java programming and its features.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Java Question

The document outlines a Java examination for February 2024, consisting of multiple-choice questions in Part A, short answer questions in Part B, and programming tasks in Part C. It covers various Java concepts, including data types, arrays, methods, and object-oriented programming principles. The exam is structured to assess knowledge of Java programming and its features.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

[JAVA EXAMINATION]

(February-2024)
PART-A(20*1=20)

1. Number Of Primitive Data Types In Java Are?


A)6 B)7 C)8 D)9
2. What Is The Size Of Float And Double In Java?
A)32 And 64 B)32 And 32 C)64 And 64 D)64 And 32
3.Automatic Type Conversion Is Possible In Which Of The Possible Cases?
A) Byte To Int B) Int To Long C) Long To Int
D) Short To Int
4. Find The Output Of The Following Code.
Int Integer = 24;
Char String = ‘I’;
System.Out.Print(Integer);
System.Out.Print(String);
A) Compiler Error B) Throws Exception C)1 D)241
6. Find The Output Of The Following Program.
Public Class Solution{
Public Static Void Main(String[] Args){
Byte X = 127;
X++;
X++;
System.Out.Print(X);
}
}
A)127 B)-127 C)129 D)2
7, Select The Valid Statement.
A) Char[] Ch = New Char(5) B)Char[] Ch = New Char[5]
C)Char[] Ch = New Char() D)Char[] Ch = New Char[]

8.Find The Output Of The Following Program.


Public Class Solution{
Public Static Void Main(String[] Args){
Int[] X = {120, 200, 016};
For(Int I = 0; I < X.Length; I++){
System.Out.Print(X[I] + “ “);
}
}
}
A)120 200 016 B)120 200 14 C)120 200 16
D)None
9. When An Array Is Passed To A Method, What Does The Method Receive?
A) The Reference Of The Array B) A Copy Of The Array C) Length Of The
Array D) Copy Of First Element
10. Select The Valid Statement To Declare And Initialize An Array.
A) Int[] A = {} B)Int[] A = {1, 2, 3} C)Int[] A = (1, 2, 3)
D)Int[][] A = {1,2,3}
11.Find The Value Of A[1] After Execution Of The Following Program.
Int[] A = {0,2,4,1,3};
For(Int I = 0; I < A.Length; I++){
A[I] = A[(A[I] + 3) % A.Length];
}
0 B)1 C)2 D)3

12. Arrays In Java Are-


A) Object References B) Objects C) Primitive Data Type
D) None
13. When Is The Object Created With New Keyword?
A) At Run Time B) At Compile Time C) Depends On The Code
D) None
14.Identify The Corrected Definition Of A Package.
A)A Package Is A Collection Of Editing Tools B)A Package Is A Collection Of
Classes C)A Package Is A Collection Of Classes And Interfaces
D) Package Is A Collection Of Interfaces
15. Identify The Keyword Among The Following That Makes A Variable Belong To A
Class, Rather Than Being Defined For Each Instance Of The Class.
Final
Static
Volatile
Abstract
16. In Which Of The Following Is Tostring() Method Defined?
A)Java.Lang.Object B)Java.Lang.String C)Java.Lang.Util
D)None
17. Compareto() Returns
A)True B)False C)An Int Value D)None
18. Identify The Output Of The Following Program.
String Str = “Abcde”;
System.Out.Println(Str.Substring(1, 3));
A)Abc B)Bc C)Bcd D)Cd

19. Identify The Output Of The Following Program.


String Str = “Hellow”;
System.Out.Println(Str.Indexof(‘T));
A)0 B)1 C)-1 D)True
20. Identify The Output Of The Following Program.
Public Class Test{
Public Static Void Main(String Argos[]){
String Str1 = “One”;
String Str2 = “Two”;
System.Out.Println(Str1.Concat(Str2));
}
}
A) One B) Two C) Onetwo D)Twoone

PART-B(5*3=15)
1.What Is The Most Important Feature Of Java?

2.Differentiate Between A JDK And A JVM?

3.Explain The Significance Of Static Variable?

4.What Is An Abstract Class And What Is Its Purpose?

5.What Are Differences Between Interface And Abstract Class?

6.What Are Differences Between Class And Abstract Class?

7.Differentiate Between Method Overriding And Overloading?

8.What Are Differences Between This Keyword And Super Keyword?

Part-C(3*5=15)
1.Write A Program For Multithreading Using Synchronized Method?

2.What Is Serialization And De-Serialization With Coding?

3.How Can You Create A Table Into Database Using Jdbc?

4.What Is Abstract Class? Explain In Detail.

5. What Is Servlet? Explain In Detail.

You might also like