0 ratings0% found this document useful (0 votes) 19 views11 pages2 Java Concept MCQ1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Q Result & analysis
anemptt v | of ot
Studont: Shaurya DevFathak —Emcilid: shauryedevpathak@gmallcom Tost: PREP_JAVA_MCQ__Dotatypes/iO
(Course: 2026 Java Programming Preparatory Course_levell)
@ we acaress: 10320088147 8 Top suitenes: —- © 05 Used: windows
© Tost Duration: 001658 © Tost stort Time: Jun, 2024]. Tost Submit Time: Jun 7, 2028
sor
O92 08)
‘Question No:
Multi Choice Type Question
‘What willbe the output of the following Java program?
lass variable scope
public static void main(String argel])
2
3
a
5
6
7
8
@ Bronser Used: Crrome9 Systenout.print(x +" + ys
10 y
11 System.cut-printinGc +" * + ys
rn)
po}
5656
565
Status Comect | Meriobtoined 2/2 | Hints used 0 Level Easy | Questiontype MCQShngleCorrect | subject Java
Topic Datatypes/io sub Topic Dotatypes/io Blooms toxonomy Analyse
Question No: 2
Multi Choice Type Question
Analyze the output for the following cade:
public class Main
{
public static void main(string[] ares) {
1
2
3
47° final int 3:undefined
Error. Cant mesiy tinal variable @
Status Comect | Markobtoined 2/2 | Hints used 0 Level Easy | Questiontype MCQSingleCorrect | Subject Java
‘Topic Datatyper/iO Sub Topic Datatypes/io looms tsxcnamy Analyse
‘Question No: 3
Multi Choice Type Question
Analyze the output of the falawing,
a) public class Main
2¢
3 public static void main(String!) ares)
af
Final int7 ‘system -out peintln(a);
23
5
D
None of the above
Stotus Comect | Markobtoined 2/2 | Hints used 0 Level Easy | Questiontype MCQSIngleCorrect | subject Java
Topic Datatyper/io | sub Topic Dotatypes/i0 Blooms toxcromy Analyse
‘Question No: 4
Multi Choice Type Question
|Which statement Is true about primitives?
CenPrimitive types can be set to null.
String is @ primitive,
‘You can ereate your own primitive types.
Status Comect | Markobtoined 2/2 | Hints used 0 Level Easy | Questiontype MCQSingleCorrect | Subject Java
Topic Datatypes/io | sub Topic Datatypes/IO Blooms taxonomy Remember
‘Question No: 5
Multi Choice Type Question
‘of the typos double, nt long, cnd short, how many could fil in tho blank to have this code output OF
ay atsts defaultValue;
2 public static void ezin(String{] args) {
5 1 Syatem-cut printIn( defaultValue)
a)
Coal PdStotus Wrong | Markobteined 0/2 Hints used © Level Medium Question type MCQSingle Correct
Subject Java Topic Datatypee/IO | sub Topic Datalypes/io looms taxcnomy Analyse
©) show solution
‘Question ne
Multi Choice Type Question
Which isthe first line to trigger a compiler error?
4) public class Main
24
3 public static void main(steingt] fruits)
at
5 double ¢1= 54; 7 pl
6 double €2 = 5.6; // p2
7 float f= 5/7 03
8 fost #2- 5.8; // pa
5)
10>8
status wrong | Markobtained 0/2 Mintsused © Level fasy Questontype MCQSinglecomect | subject
Tople Datatyper/iO sub Toplc Datatypes/i0 looms taxonomy Analyse
Question No: 7
Multi Choice Type Question
‘What is the fest ling in the following cade that does net compile?
A) public class Main
24
3 public static void main(String] ares)
af
5 int Integer = 6; di
6 Integer int Wika
7 Integer +45 is
ae)
12)
«INone of the above mentioned
Stotus Comect | Merkobtoined 2/2 | Hints uted 0 Level Medlum — Questientype MCQSingle Correct
Subject Java Tople Datatypes/IO | Sub Topic Datatypes/io looms taxonomy Analyse
‘Question No: 8
Multi Choice Type Question
Sle of float and double in java is
Cy
40nd 84
20nd 32
4 and 22Status Comect | Markobtoined 2/2 | Hints used 0 Level Eaey | Questiontype MCQSingleCorrect | Subject Java
Topic Datatypes/iO | SubTopic Datatypes/io looms taxonomy Understand
Question No: 8
Multi Choice Type Question
Sie of intin Java ie
ebits
64 bits
‘depends on execution environment
totus Conect | Morobtcined 2/2 | Hintsused 0 Level Fay | Queston‘ype MCQSIMgleComect subject seve
Topic Batalypes/io | SubTopio Dataypes/tO Bloometoxonomy Remember‘Question No: 10
Multi Choice Type Question
‘What willbe the output of the following program?
2 public class tain {
public static void main(strinel] are) {
5 Entener integer = raw anteser(®);
4 Systom-cut print (integer bytoVale())5
S Syatemoutprint("=")s
& int 2 = now Integer(4)5
7 System-out-print(d-byteValue()) 5
mm
40
44
exception
Status Comect | Morkobtoined 2/2 | Hints used 0 Level Medlum — Questiontype MCQ Single Correct
Subject Java Tople Batotypes/iO | Sub Topic Datatypes/io looms taxonomy Analyse