What is an international standerd for defining real numbers in java ?
AIEEE654
BIEEE555
CIEEE754
DIEEE455
Correct Answer: Option C
Note: GSEB Commerce Oct-2020
MCQ 2Data types
Which of the following determines the required memory size, type of value, range of values and types of operations that can performed?
AVariable
BLiteral
CComment
DData types
Correct Answer: Option D
Note: GSEB Commerce Oct-2020
MCQ 3Associativity
Which of the following operators have no right-to-left associativity?
A&&
B?:
C+=
D--
Correct Answer: Option A
Note: GSEB Commerce Oct-2020
MCQ 4Variables
Which of the following words is not a reserved word?
Awhile
B$price
Cstatic
Dclass
Correct Answer: Option B
Note: GSEB Commerce Oct-2020
MCQ 5Use of brake and continue statement
Which statement is used to transfer the control outside switch or loop structure?
AContinue
BBreak
CGo
Dif ย
Correct Answer: Option B
Note: GSEB Commerce Oct-2020
MCQ 6Short circuiting
In short-circuiting,in which case if first opened is false, ย there is no need to evaluate second operand ?
A||
B&&
C?:
D*=
Correct Answer: Option B
Note: GSEB Commerce Oct-2020
MCQ 7Operators
what will be the result of arithmetic expection โ12.5%7.2?
A5.3
B5
C-5.3
D-5
Correct Answer: Option C
Note: GSEB Commerce Oct-2020
MCQ 8String literals
The Unicode sequence u2122 produces what type of symbol?
ATM
Bยฎ
Cยฉ
D@
Correct Answer: Option A
Note: GSEB Commerce Oct-2020
MCQ 9Literals
THE NAME USED FOR A CONSTANT VALUE IS KNOWN AS WHAT IN JAVA.
ASTRING
BARRAY
CLITERAL
DCLASS
Correct Answer: Option C
Note: null
MCQ 10Creating simple of java application
WHEN JAVA PROGRAM CREATED JAVA SOURCE FILE USING TEXT EDITOR,WHICH FILE EXTENSION SHOULD BE GIVEN.
A.CLASS
B.HTML
C.JPG
D.JAVA
Correct Answer: Option D
Note: null
MCQ 11The process of compiling and executing a java application
WHICH OPREATOR CAN BE USED TO CONCATENATE A STRING IN JAVA.
A =
B +
C &
D *
Correct Answer: Option B
Note: null
MCQ 12Data types
WHAT IS THE DEFAULT VALUE OF BOOLEAN DATA TYPE OF JAVA.
AFALSE
BTRUE
CO (ZERO)
D1
Correct Answer: Option A
Note: null
MCQ 13Comments
WHICH SIGN INDICATES SINGLE LINE COMMENT IN JAVA?
A/* AND ENDS WITH */
B/** AND ENDS WITH */
C//
D#
Correct Answer: Option C
Note: null
MCQ 14Rules to define variables
FROM THE FOLLOWING WHICH IS THE ILLEGAL NAME OF VARIABLE IN JAVA?
A4ME
BRESULT
CAMOUNT$
DPRICE$
Correct Answer: Option A
Note: null
MCQ 15The process of compiling and executing a java application
WHICH COMMAND IS USED TO COMPILE SOURCE PROGRAM IN SCITE?
AEDIT-COMPILE
BFROMAT-COMPILE
CTOOLS - COMPILE
DFILE-COMPILE
Correct Answer: Option C
Note: null
MCQ 16Operators
FROM THE FOLLOWING WHICH IS NOT A COMPARISON OPREATOR IN JAVA?
A>
B<
C<=
D +
Correct Answer: Option D
Note: null
MCQ 17Introduction of java
JAVA LANGUAGE WAS DEVELOPED BY WHOM?
ASUN MICROSYSTEM
BORACLE
CNETSCAPE
DMICROSOFT
Correct Answer: Option A
Note: null
MCQ 18Java virtual machine(JVM)
WHAT IS THE FULL FORM OF JVM?
AJAVA VISIBILITY MODIFIER
BJAVA VISUAL MODEM
CJAVA VIRTUAL MACHINE
DJAVA VISUAL MACHINE
Correct Answer: Option C
Note: null
MCQ 19Introduction of java
In Java, a block statement is a group of statements enclosed between which bracket ?
A< >
B( )
C[ ]
D{ }
Correct Answer: Option D
MCQ 20Data types
What is the value of float data type in Java ?
ABoolean
BCharacter
CInteger
DReal
Correct Answer: Option D
MCQ 21Conditional operator
How many types of control structures are there in Java ? Which ?
A3. Loops, Branches, Functions
B2. Function & Method
C3. for, while, do,while
D2. Loops, Branches
Correct Answer: Option D
MCQ 22Introduction of java
Java supports how many basic (primitive) data types ?
A8
B2
C4
D6
Correct Answer: Option A
Note: S-March-2020
MCQ 23Introduction of java
Which symbol is used for Assignment operator in Java ?
A#
B$
C?
D=
Correct Answer: Option D
MCQ 24Introduction of java
In Java, which statement is used when there are many alternative actions to be taken depending upon the value of a variable or expression ?
AControl
BSwitch
CRepeat
DNested if
Correct Answer: Option B
MCQ 25Introduction of java
Which numeric digits are used for Hexadecimal numbers (16 digits) in integer literals in Java ?
A0 to 8
B0 to 9
C0 to 15
D0 to 16
Correct Answer: Option B
MCQ 26Introduction of java
What will be the result of arithmetic expression 7/2, 7%2, -7.5%2 ?
A3, 3.5, -3
B3.5, 1, -1.5
C3.5, 3, -1.5
D3, 1, -1.5
Correct Answer: Option D
MCQ 27Introduction of java
In Java, String literals is a sequence of characters and its enclosed in which symbol ?
A(single quotes)
B" " (Double quotes)
C? ?
D{ }
Correct Answer: Option A
MCQ 28Introduction of java
In Java, the machine language for Java Virtual Machine is known as which code ?
AJava codebyte
BJava filecode
CJava bytecode
DJava codefile
Correct Answer: Option C
MCQ 29Introduction of java
In Java, for boolean data type there are precisely two literals, which are they ?
ATrue and False
B0 and 1
CY and N
DYes and No
Correct Answer: Option A
MCQ 30Introduction of java
In SciTE editor, which menu - option is used if the program is compiled without any error ?
AFormat - Go
BFile - Go
CEdit - Go
DTools - Go
Correct Answer: Option D
MCQ 31Introduction of java
In SciTE editor, which menu - option is used to compile java source program ?
AFormat - Compile
BFile - Compile
CEdit - Compile
DTools - Compile
Correct Answer: Option D
MCQ 32Introduction of java
To use a labeled loop, which symbol is added before the loop ?
A$
B*
C:
D#
Correct Answer: Option C
MCQ 33Introduction of java
In Java, Characters literals are stored by how many bit Unicode characters ?
A16-bit
B8-bit
C4-bit
D32-bit
Correct Answer: Option A
MCQ 34Data types
What is the storage space for data type float in Java ?
A16 bytes
B8 bytes
C4 bytes
D2 bytes
Correct Answer: Option C
MCQ 35Introduction of java
Which symbol is used for Logical operator AND, OR, NOT, XOR in Java ?
A&&, !, |, ^
B&&, ||, !, ^
C&, |, !, ^
D&&, !, ||, ^
Correct Answer: Option B
MCQ 36Introduction of java
What is the default data type of floating point literal ?
Along
Bfloat
Cdouble
Dint
Correct Answer: Option A
MCQ 37Introduction of java
To compile the java program we have to type what in front of source file name ?
Ajava filename.java
Bjavac filename
Cjavac filename.class
Djavac filename.java
Correct Answer: Option D
MCQ 38Variables
A name used to refer to the data stored in memory is called what ?
AVariable
BObject
CValue
DFunction
Correct Answer: Option A
MCQ 39Introduction of java
In Java, which of the following is illegal way to define variable name ?
A%discount
B4me
CAll of these
Dbirth date
Correct Answer: Option C
MCQ 40Introduction of java
Which of the following data type is used for real numbers ?
Aboolean
Bbyte, short, int, long
Cfloat, double
Dchar
Correct Answer: Option C
MCQ 41Introduction of java
In Java, variable name should begin with which of the following ?
AUnderscore (_)
BAll of these
CAlphabet
DDollar sign ($)
Correct Answer: Option B
MCQ 42Introduction of java
Which of the following is Increment and Decrement operator in Java ?
A=+ and =-
B=- and =+
C++ and --
D+ and -
Correct Answer: Option C
MCQ 43Introduction of java
Which operator can be used to concatenate a string in Java ?
A&
B+
C*
D=
Correct Answer: Option B
MCQ 44Introduction of java
What kind of the primitive data types are provided in Java from the following ?
AAll of these
Bbyte, short, int, long
Cchar, boolean
Dfloat, double
Correct Answer: Option A
MCQ 45Introduction of java
Which of the following editor is used to create Java file in Ubuntu ?
ACalc
BSciTE
CWriter
DGedit
Correct Answer: Option B
MCQ 46Introduction of java
Which of the following Escape code is used for backspace in Java ?
A
Bs
Cf
Ds
Correct Answer: Option A
MCQ 47Introduction of java
In Java, which statement is used to exit from the loop ?
Astop
Bexit
Cbreak
Dout
Correct Answer: Option C
MCQ 48Introduction of java
In Java, which of the following is legal way to define variable name ?
AAll of these
BCallCost, top5students
Cbirth_date, result
Ddate, amount$, $price
Correct Answer: Option A
MCQ 49Introduction of java
In Java, which statement is used to skip the following statements in a loop and continue with the next iteration ?
Abreak
Bcontinue
Cgo
Drun
Correct Answer: Option B
MCQ 50Introduction of java
When the program gets compiled without error, compiler creates a file with which extension ?
A.java
B.class
C.txt
D.jar
Correct Answer: Option B
MCQ 51Introduction of java
In Java, which statement is used to transfer the control outside switch or loop structure ?
Abreak
Bloop
Ccontinue
Dgo
Correct Answer: Option A
Note: S-March-2020
MCQ 52Introduction of java
In Java, which of the following is not allowed as first character in valid variable name ?
AUnderscore (_)
BAlphabet
CDollar sign ($)
DDigit
Correct Answer: Option A
MCQ 53Introduction of java
In Java, which option indicates Single line, Multi-line and API Documentation comment ?
A//, /* .. /, /**.. */
B//, /* .. */, /* .. *//
C//, /* .. */, /** .. */
D//, // .. //, /** .. */
Correct Answer: Option C
MCQ 54Introduction of java
Which two symbols are used for Conditional operator in Java ?
A?;
B;?
C?:
D:?
Correct Answer: Option C
MCQ 55Introduction of java
Which of the following is considered as comparison operator in Java ?
A#
B=!
C=
D!=
Correct Answer: Option D
MCQ 56Introduction of java
What is the extension of Java Source file ?
A.obj
B.java
C.jar
D.src
Correct Answer: Option B
MCQ 57Introduction of java
Which of the following is a Comparison operator in Java ?
AAND, OR, NOT, XOR
B==, !=, <, >, >=, <=
C++, --
D?:
Correct Answer: Option B
MCQ 58Introduction of java
Which character set is used for char data type in Java ?
AASCII
BEBCIDIC
CAll of these
DUnicode
Correct Answer: Option D
MCQ 59Introduction of java
Which of the following is Entry-controlled or Pre-test loop constructs in Java ?
Afor and while
Bwhile
Cfor
Ddo while
Correct Answer: Option B
MCQ 60Introduction of java
In Java program, which methods are used to display results ?
ASystem.out.println()
BSystem.out.print()
CSystem.print.display()
DSystem.out.print() and System.out.println()
Correct Answer: Option D
MCQ 61Introduction of java
Who developed Java language ?
ASun Microware
BSun Microsystems
CSun Microsource
DSun Microsoft
Correct Answer: Option B
MCQ 62Introduction of java
What is known as when programs written in Java are compiled into machine language for a computer that doesnt really exist ?
AJava Visible Machine
BJava Verified Machine
CJava Virtual Machine
DOption 4
Correct Answer: Option C
MCQ 63Introduction of java
In Java, which of the following is used to repeat a sequence of statements over and over until some condition occurs ?
ALoops
BRepeats
CBranches
DBreaks
Correct Answer: Option A
Note: S-March-2020
MCQ 64Introduction of java
In Java, what is the default value of Boolean data type ?
ATRUE
B1
C0
DFALSE
Correct Answer: Option D
MCQ 65Introduction of java
In Java, a name used for constant value is known as what ?
AFunction
BOperator
CLiteral
DVariable
Correct Answer: Option C
MCQ 66Java virtual machine(JVM)
By using which extension file java interpreter byte code executes ?
A.txt
B.java
C.class
D.html
Correct Answer: Option C
MCQ 67Introduction of java
From the following which is not compiled or interpreted in Java ?
AComment
BFunction
CVariable
DMethod
Correct Answer: Option A
MCQ 68Introduction of java
Which of the following is Exit controlled or Post-test loop constructs in Java ?
Awhile
Bdo while
Cfor
Dfor and while
Correct Answer: Option B
MCQ 69Introduction of java
Which of the following variable name is not valid in Java?
A_marks
B4subject
Ctotal_marks
D $age
Correct Answer: Option B
Note: March-2020 Sci,S-March-2020
MCQ 70Introduction of java
Which of the following statement is used to transfer the control outside Switch or Loop construct?
Acontinue
Belse
Cend
Dbreak
Correct Answer: Option D
MCQ 71Introduction of java
Which of the following is used to repeat a sequence of statements over and over until some condition occurs?
Ablock
Barray
Cloops
Dboolean
Correct Answer: Option C
MCQ 72Introduction of java
What is it called when ++ operator is used after variable name in Java?
Apost increment
Bpre increment
Cincrement pre
Dpre decrement
Correct Answer: Option A
Note: S-March-2020
MCQ 73Introduction of java
What will be the result of arithmetic experssin 9%2 ?
A4.5
B1
C4
D0
Correct Answer: Option B
Note: S-March-2020
MCQ 74Introduction of java
Single line comment begins with which sign in Java?
A/*
B/**
C//
DALL
Correct Answer: Option C
Note: S-March-2020
MCQ 75Introduction of java
Which of the following is not a proper example of Hexa decimal number?
AOXFF7A
BOX39A2
COX39A2
DOABC
Correct Answer: Option D
MCQ 76Introduction of java
Which logical operator returns true only if its operands are different (one true and one false) and false otherwise?
AXOR
BOR
CAND
DNOT
Correct Answer: Option A
MCQ 77Introduction of java
Which of the following is a proper option for the statement โIs A not equal to Bโ?
AA <> B
BA โ B
CA NOT B
DA!= B
Correct Answer: Option D
MCQ 78Introduction of java
When a variable is declared inside a block, what is it called?
AGlobal
BLocal
CLabel
DRepetitive
Correct Answer: Option B
MCQ 79Introduction of java
If a=12.5 and b=7.2, then after executing a%b, what will be the remainder?
A1
B5.3
C5
D1.22
Correct Answer: Option B
MCQ 80Introduction of java
In switch statement, if no match is found between test expression and case values, then which statement will be executed?
Abreak
Bcontinue
Cifโฆelse
Ddefault
Correct Answer: Option D
MCQ 81Introduction of java
If the conditional ternary is (N%2==0)?(N/2):(3*N+1); where N=7 then what will be the value of variable next?
A22
B7
C3.5
D0
Correct Answer: Option A
MCQ 82Introduction of java
What sign is used for creating API documentation from the code ?
A//
B/*
C*/
D/**
Correct Answer: Option D
Note: March-2015 Gen
MCQ 83Introduction of java
Which of the following is compiled error free?
Afor(;;){int i=7};
Bwhile (1) { int i=7};
Cwhile (true){int i=7}
DAll of these
Correct Answer: Option D
MCQ 84Introduction of java
In Java, Which of the following looping is exit controlled?
Afor
Bwhile
Cdo..while
DAll of these
Correct Answer: Option C
MCQ 85Introduction of java
What kind of primitive data types are provided in Java from the following?
Aboolean
Bdouble
Cchar
DAll of these
Correct Answer: Option D
MCQ 86Introduction of java
While creating Java what must be the same ?
Afolder name, filename
Bclass name, extension
Cclass name, folder name
Dclass name, file name
Correct Answer: Option D
MCQ 87Introduction of java
When the program gets compiled without error, compiler creates a file with which extension ?
A.comp
B.txt
C.java
D.class
Correct Answer: Option D
MCQ 88Introduction of java
Which of the following is right way to define variable ?
A$age
Bdiscount rate
C4you
D%discount
Correct Answer: Option A
MCQ 89Introduction of java
String literals is a sequence of characters enclosed in which quotes ?
ASingle(' ')
BDouble(" ")
C{ }
D( )
Correct Answer: Option B
MCQ 90Introduction of java
Which of the two symbols are used in the conditional operator in Java ?
A: and *
B# and ?
C? and :
D/ and ?
Correct Answer: Option C
MCQ 91Introduction of java
While using shorthand version of assignment, it is defined as a+=b where a is 7 and b is 8 then what will result of a ?
A8
B49
C14
D15
Correct Answer: Option D
MCQ 92Introduction of java
When two operators are having different priority, then an operator with higher precedence is operate________
Afirst
Blast
Csecond
Dmiddle
Correct Answer: Option A
MCQ 93Introduction of java
Control structure branches are used to choose among two or more possible courses of action, is called as what ?
AMore structure
BLoop structure
CAddition structure
DSelective structure
Correct Answer: Option D
MCQ 94Introduction of java
Switch statement can be stopped using which statement ?
Abreak
Brun
Ccontinue
Derror
Correct Answer: Option A
MCQ 95Introduction of java
do โฆ.. while loop is which type of loop ?
ALoop controlled
BBreak controlled
CExit controlled
DEntry controlled
Correct Answer: Option C
MCQ 96Introduction of java
To use a labeled loop, which symbol is added before the loop?
A*
B$
C:
D@
Correct Answer: Option C
MCQ 97Introduction of java
in java, the text written in /*โฆ.*/ is considered as what ?
AMethod
BClass
CComment
DAll of these
Correct Answer: Option C
MCQ 98Introduction of java
user can create Java source file by using ____________ application?
AScite Editor
BASCII text editor
CBoth (A) & (B)
DNone of these
Correct Answer: Option C
MCQ 99Introduction of java
The definition of the method (function) in java consists of function head and the sequence of statement enclosed in which bracket?
A<>
B{ }
C( )
DAll of these
Correct Answer: Option B
MCQ 100Introduction of java
Which extension is used to source file of java language, written in a text editor?
A.class
B.html
C.java
D.jpg
Correct Answer: Option C
MCQ 101Introduction of java
From the following which methods are used to display results?
ASystem.out.print()
BSystem.out.println()
CBoth (A) & (B)
DSystem.out.display()
Correct Answer: Option C
MCQ 102Introduction of java
In java, the program is compiled without any error, which command is used to execute it?
ATools -> Go
BTools -> Run
CTools -> Build
DTools -> Compile
Correct Answer: Option A
MCQ 103Introduction of java
From the following which are the examples of reserved words in Java?
Aclass
Bpublic
Cstatic
DAll of these
Correct Answer: Option D
MCQ 104Introduction of java
A name used for a constant value is known as what in Java ?
AString
BArray
CLiteral
DClass
Correct Answer: Option C
MCQ 105Introduction of java
From the following which is not logical operator in Java?
AAnd
BOr
CNot
DEqual
Correct Answer: Option D
MCQ 106Introduction of java
In java, at which level platform โindependence is possible due to bytecode interpreter?
Abrowser
Bsource
Cmachine
Dbinary
Correct Answer: Option D
MCQ 107Introduction of java
in Java, the machine language for Java Virtual Machine is known as which code?
Ajava filecode
Bjava bytecode
Cjava intcode
Djava sourcecode
Correct Answer: Option B
MCQ 108Introduction of java
What is the storage space for datatype float in java?
A1 Byte
B2 Byte
C4 Byte
D8 Byte
Correct Answer: Option C
MCQ 109Introduction of java
Real numbers in Java are compliant with which of the following?
AIEEE 123
BIEEE 120
CIEEE 754
DIEEE 780
Correct Answer: Option C
MCQ 110Introduction of java
In java, variable name should begin with which of the following?
AAlbhabet
BUnderscore
CDollar
DAll of these
Correct Answer: Option D
MCQ 111Introduction of java
Java 7 also supports binary numbers, using digits 0 and 1 but it should be prefix by which of the following?
A0b or 0B
BB
Cb
Db0
Correct Answer: Option A
MCQ 112Introduction of java
In java, for type boolean there are precisely two literals, which are they?
AY or N
B0 and 1
CTrue and False
DYes Or No
Correct Answer: Option C
MCQ 113Introduction of java
Arithmetic operators in java, can be applied on which numeric data?
Ashort
Bfloat
Cdouble
DAll of these
Correct Answer: Option D
MCQ 114Introduction of java
Which of the following is considered as comparison operator in Java?
A=
B/
C%
D!=
Correct Answer: Option D
MCQ 115Introduction of java
In java,logical operators are also called which of the following operators if they operate on Boolean operands?
Aassignment operator
BBoolean operator
CIncrement operator
DRelational operator
Correct Answer: Option B
MCQ 116Introduction of java
Java language was developed by whom?
ASun Microsystem
BOracle
CNetscape
DMicrosoft
Correct Answer: Option A
Note: S-March-2020
MCQ 117Introduction of java
Which of the Java syntax is very similar to which language?
APython
BC
CJava Script
DAll of these
Correct Answer: Option B
MCQ 118Introduction of java
The alphabet D in JDK stands for which of the following?
ADepartment
BDevelopment
CDesign
DDesktop
Correct Answer: Option B
MCQ 119Introduction of java
In Java, which of the following is same as q && = p?
Aq = qp
Bq=q-p
Cq=q+p
Dq=q && p
Correct Answer: Option D
Note: G-March-2022
MCQ 120Introduction of java
In Java, which logical operator results in complemented result?
ANOT
BAND
COR
DXOR
Correct Answer: Option A
Note: G-March-2022
MCQ 121Introduction of java
In Java, which escape code represents โcarriage returnโ?
A\n
B\r
C\t
D\f
Correct Answer: Option B
Note: G-March-2022
MCQ 122Introduction of java
In Java, which of the following is an invalid variable name?
AtotalAmount
Bbirth Date
C$price
Dtop5students
Correct Answer: Option B
Note: G-March-2022
MCQ 123Introduction of java
In Java, in switch statement, which of the following statements will be executed, when no match is found?
Abreak
Bdefault
Ccontinue
Dexit
Correct Answer: Option B
Note: G-March-2022
MCQ 124Introduction of java
In Java, what will be the value of variable next, where next (N%2==0)? (N/2): (3*N+1); and N is 9?
A4.5
B9
C28
DError
Correct Answer: Option C
Note: G-March-2022
MCQ 125Introduction of java
In Java, which of the following enables to take one of two alternative courses of action depending on whether the value of a given boolean valued expression is true or false?
ASwitch statement
BFor loop
CWhile loop
DIf-statement
Correct Answer: Option D
Note: G-March-2022
MCQ 126Introduction of java
In Java, which of the following is a correct syntax of do... while loop?
Ado {statements} (exp);
Bdo (exp) {statements} (while);
Cdo (expl; exp2; exp3) {statements};
Ddo (exp) {statement1} while {statement2};
Correct Answer: Option A
Note: G-March-2022
MCQ 127Introduction of java
In Jaya, which of the following determines the, required memory size, type of values, range of values and type of operations that can be performed?
AVariables
BData types
CComments
DArithmetic operators
Correct Answer: Option B
Note: G-March-2022
MCQ 128Introduction of java
Which of the following commands is used to compile the Java program?
Arun
Bexecute
Cjavac
Djava
Correct Answer: Option C
Note: G-March-2022
MCQ 129Introduction of java
Which language is considered as one of the ideal language for distributing executable programs via the World Wide Web?
ACSS
BHTML
CJavaScript
DJava
Correct Answer: Option D
Note: G-May-2019
MCQ 130Introduction of java
In Java, which of the following determines the required memory size, type of values, range of values and type of operations that can be performed?
AData Types
BOperators
CComments
DLiterals
Correct Answer: Option A
Note: G-May-2019
MCQ 131Introduction of java
Which of the following is a valid variable name in Java?
A4me
Bbirth date
Cdate
D%discount
Correct Answer: Option C
Note: G-May-2019
MCQ 132Introduction of java
In the structure of Java program, what is used as a place holder?
AText in <> brackets
BText in { } brackets
CText in ( ) brackets
DText in [ ] brackets
Correct Answer: Option A
Note: G-May-2019
MCQ 133Introduction of java
Which type of Java comment is usually used to have more than one line as comments?
ASingle-line comment
BKeyword comment
CMulti-level comment
DMulti-line comment
Correct Answer: Option D
Note: G-May-2019
MCQ 134Introduction of java
In Java, which of the following syntax is used to declare a variable?
A{type-name};
B{variable-names };
C;
D;
Correct Answer: Option B
Note: G-May-2019
MCQ 135Introduction of java
In the conditional operator of Java, which symbols are used in the expression to delimit three operands?
A?:
B+$
C#$
D#%
Correct Answer: Option A
Note: G-May-2019
MCQ 136Introduction of java
In Java, which of the following is a valid example of octal number?
A"037"
B0x2A
C-59
D\400E9
Correct Answer: Option A
Note: G-May-2019
MCQ 137Introduction of java
In Java, what are used to choose among two or more possible courses of action?
ALoops
BVariables
CClass
DBranches
Correct Answer: Option D
Note: G-May-2019
MCQ 138Introduction of java
What is the default data type of floating point literal?
Along
Bboolean
Cdouble
Dchar
Correct Answer: Option C
Note: G-May-2019
MCQ 139Introduction of java
โLibrary has a roomโ, is an example of which of the following Java Properties?
AInheritance
BData Abstraction
CAggregation
DPolymorphism
Correct Answer: Option C
Note: G-May-2019
MCQ 140Introduction of java
In Java, what will be the output of 8 % 3?
A1
B0
C2
D8
Correct Answer: Option C
Note: G-May-2019
MCQ 141Data types
Java supports how many primitive data types?
A2
B4
C6
D8
Correct Answer: Option D
Note: G-March-2019
MCQ 142Repetitive control structures
In Java, which of the following is used to repeat a sequence of statements over and over until some condition occurs?
ALoops
BBranches
CBreaks
DSets
Correct Answer: Option A
Note: G-March-2019
MCQ 143Introduction of java
Which of the following is the general expression of conditional operator?
A?:
B:ย ?< expression2 >
C< expression >?ย : < expression2 >
DAll of the given
Correct Answer: Option A
Note: null
MCQ 144Introduction of java
Which symbol is used to add single line comment in Java?
A/
B/ *
C//*
D//
Correct Answer: Option D
Note: null
MCQ 145Introduction of java
Which menu and commands are used to compile Java source file in SciTE Text Editor?
AFileโCompile
BTools โCompile
CEdit โ Compile
DTools โ Run
Correct Answer: Option B
Note: null
MCQ 146Introduction of java
Which of the following is mandatory method in Java program?
Aprivate
Bpublic
Cmain
Dprotected
Correct Answer: Option C
Note: null
MCQ 147Introduction of java
How many bytes are occupied by int data type in Java?
A2
B4
C6
D8
Correct Answer: Option B
Note: null
MCQ 148Introduction of java
For which of the following, break statement is used within switch statement?
ATo end the switch statement
BTo repeat switch statement
CTo end the program
DAll of the given
Correct Answer: Option A
Note: null
MCQ 149Introduction of java
Which of the following is a valid variable name in java, if variable name includes several words?
AbalanceAmount
Bbirth_date
CBirthDate
DAll of the given
Correct Answer: Option D
Note: null
MCQ 150Introduction of java
Which of the following operators do not have left-to-right associativity?
A*=
B&&
C+. -
D*, ?, %
Correct Answer: Option A
Note: null
MCQ 151Introduction of java
Which of the following can't be nested?
ALoop
BComment
CBoth A and B
DNone of the given
Correct Answer: Option B
Note: null
MCQ 152Introduction of java
\uddd represents _______________________
Acharacter represented by three octal digits
Bcharacter represented by two hexadecimal digits
Ccharacter represented by unicode number dddd
DNone of the given
Correct Answer: Option C
Note: null
MCQ 153Introduction of java
Which of the following is a format of block?
A{ < statements > }
B < statements > { }
Cif < > { statement }
Dcase < constant-1 > { }
Correct Answer: Option A
Note: null
MCQ 154Introduction of java
Which sign is used to enclose multi-line comments in Java?
A/* and */
B/ and
C// and \\
D/** and **/
Correct Answer: Option A
Note: null
MCQ 155Introduction of java
Which menu and commands are used to compile Java source file in SciTE text Editor?
AFile โ Run
BTools โ Run
COptions โ Go
DTools โ Go
Correct Answer: Option B
Note: null
MCQ 156Introduction of java
What should be the extension of Java file?
A.c
B.java
C.class
D.doc
Correct Answer: Option B
Note: null
MCQ 157Introduction of java
Which sign is used to separate the variables while declaring more than one variable in Java program?
A,
B;
C:
D#
Correct Answer: Option A
Note: null
MCQ 158Introduction of java
Which of the following takes place when no match is found with any case values of switch statement?
AThe default statement is executed
BFirst statement of case takes place
CLast statement of case takes place
DNone of the given
Correct Answer: Option A
Note: null
MCQ 159Introduction of java
In Java, names of __________________ begin with upper case letters.
Aclass
Bvariable
Cmethod
DBoth B and C
Correct Answer: Option A
Note: null
MCQ 160Introduction of java
In Java, floating point literal by default is of the type _____________
AReal
Bdouble
Cint
Dlong int
Correct Answer: Option B
Note: null
MCQ 161Introduction of java
Which of the following will represent the string value: Many "Congratulations!โ
A"Many Congratulations!"
B"Many, \"Congratulations !\โโ
C\"Many Congratulations!"\
DNone of the given
Correct Answer: Option B
Note: null
MCQ 162Introduction of java
In Java, arithmetic operation, when both operands are of different data types, lower range data type is implicitly converted to higher data type. This type of conversion is known as _______
ATypecasting
BPromotion
CA or B
DNone of the given
Correct Answer: Option B
Note: null
MCQ 163Introduction of java
The statement of which loop are executed at least once?
Afor
Bwhile
Cdo... while
DAll of the given
Correct Answer: Option C
Note: null
MCQ 164Introduction of java
Which sign is used to add documentation comments in Java program?
A// and \\
B/** and **\
C/** and */
DAll of the given
Correct Answer: Option C
Note: null
MCQ 165Introduction of java
Which of the following class is compulsory in Java program?
APublic method main()
BPublic display ( )
CBody()
DNone of the given
Correct Answer: Option A
Note: null
MCQ 166Introduction of java
Which of the following is Java compiler?
Ajavac
Bjrc
Cjava
DNone of the given
Correct Answer: Option A
Note: null
MCQ 167Introduction of java
Which of the following is an invalid Java variable?
Amarks
B%marks
C$marks
DMarks
Correct Answer: Option B
Note: null
MCQ 168Introduction of java
Which of the following is entry-controlled loop?
Afor
Bdo... while
CBoth A and B
DNone of the given
Correct Answer: Option A
Note: null
MCQ 169Introduction of java
What do the Data type determines ?
Arequired memory size
Btype of values
Crange of values and type of operations that can be performed
DAll of the given
Correct Answer: Option D
Note: null
MCQ 170Introduction of java
The names of ______________ begin with lower case letters in Java.
Avariable
Bmethod
CBoth A and B
Dclass
Correct Answer: Option C
Note: null
MCQ 171Introduction of java
Simple expression in Java can be a ______________
Aliteral
Bvariable
Cfunction call
DA or B or C
Correct Answer: Option D
Note: null
MCQ 172Introduction of java
Which of the following operator has right to left associativity?
A++, - -
B=, +=
C?:
DAll of the given
Correct Answer: Option D
Note: null
MCQ 173Introduction of java
Which statement is used to transfer the control outside switch or loop structure?
Astop
Bexit
Cbreak
Dend
Correct Answer: Option C
Note: null
MCQ 174Introduction of java
Which of the following is not a comparison operator?
A>
B<
C!=
D%
Correct Answer: Option D
Note: null
MCQ 175Introduction of java
Which method is used to add a linefeed after the end of information?
ASystem.out
BSystem.out.print
CSystem.line
DSystem.out.println
Correct Answer: Option D
Note: null
MCQ 176Introduction of java
Which of the following extension file gets created when the java source file gets compiled without any error?
A.java
B.exe
C.mac
D.class
Correct Answer: Option D
Note: null
MCQ 177Introduction of java
Which of the following is a valid Java Variable?
A4total
B_total
C%total
DNone of the given
Correct Answer: Option B
Note: null
MCQ 178Introduction of java
Which loop is used when number of iterations are pre-determined?
Afor
Bwhile
Cdo... while
DAll of the given
Correct Answer: Option A
Note: null
MCQ 179Introduction of java
In case of short circuiting-as logical operator _________________ results in false when any one of the operands is false, there is no need to evaluate second sub-expression.
A||
B& &
C?:
D*=
Correct Answer: Option B
Note: null
MCQ 180Introduction of java
The unicode code sequence \u2122 produces a ________________________ symbol.
ATM
Bยฎ
Cยฉ
D@
Correct Answer: Option A
Note: null
MCQ 181Introduction of java
Which of the following is unicode literal in Java?
A45
B0X45
C\ u00E9
D0b10110
Correct Answer: Option C
Note: null
MCQ 182Introduction of java
Which of the following refers to memory location in Java assignment statement?
AA variable used on the left-hand side of assignment statement.
BOperand of the expression
CA variable used on right-hand side
DAll of the given
Correct Answer: Option A
Note: null
MCQ 183Introduction of java
Which of the following is exit controlled loop?
Awhile
Bdo... while
Cfor
DAll of the given
Correct Answer: Option B
Note: null
MCQ 184Introduction of java
Which of the following operators when used in an expression results as boolean value?
AArithmetic
BLogical
CComparison
DAll of the given
Correct Answer: Option C
Note: null
MCQ 185Introduction of java
Which method display only information without adding a line feed at the end of the information?
ASystem.print
BSystem.out.println
CSystem.out.print
DSystem.println
Correct Answer: Option C
Note: null
MCQ 186Introduction of java
The extension of Java byte code file is _____________________
A.class
B.byte
C.java
D.exe
Correct Answer: Option A
Note: null
MCQ 187Introduction of java
In Java, there are ______ kind of variables.
A2
B3
C4
D5
Correct Answer: Option B
Note: null
MCQ 188Introduction of java
In which circumstances the for (::) loop will result in infinite loop?
AWhen break statement is not executed
BWhen some control statement is not used in for loop
CA or B
DNone of the given
Correct Answer: Option C
Note: null
MCQ 189Introduction of java
Function parameters and variables declared in the function are considered as ________ in Java.
AInstance variable
BLocal variable
CClass variable
DGlobal variable
Correct Answer: Option B
Note: null
MCQ 190Introduction of java
A unicode literal consists of ____________ followed by four hexadecimal digits.
A\u
B\ul
Cox
DOX
Correct Answer: Option A
Note: null
MCQ 191Introduction of java
The basic building blocks of expressions are ______
Aliterals
Bvariables
Cfunction calls
DAll of the given
Correct Answer: Option D
Note: null
MCQ 192Introduction of java
In short circuiting, if first operand is true in ____ there is no need to evaluate second operand.
A&&
B||
C!
D?:
Correct Answer: Option B
Note: null
MCQ 193Introduction of java
Which loop first executes the statements of a loop and then evaluates the test expression?
Afor
Bdo... while
Cwhile
DAll of the given
Correct Answer: Option B
Note: null
MCQ 194Introduction of java
What is the result of test expression after applying comparison operator to it?
ANumeric
BBoolean
CBoth A and B
DNone of the given
Correct Answer: Option C
Note: null
MCQ 195Introduction of java
The text written with system.out.print method is enclosed within __________ in Java program.
Aโ โ
Bโ โ
C# #
DAll of the given
Correct Answer: Option A
Note: null
MCQ 196Introduction of java
Which of the following command is used to execute the Java file after successful compilation?
Ajavac
Bjavae
Cjava
Drun
Correct Answer: Option C
Note: null
MCQ 197Introduction of java
Which of the following is not a type of a variable in Java?
ACamelcase variable
BInstance variable
CInteger variable
DFloat variable
Correct Answer: Option A
Note: null
MCQ 198Introduction of java
What does x+=y stands for in Java?
Ax + y = x
Bx+x=y
Cx=x+y
Dy=x+y
Correct Answer: Option C
Note: null
MCQ 199Introduction of java
In Java, with modulus operator %, if first operand is negative, _____________
Athe result is negative
Bthe result is positive
Cmathematical process will not take place
DNone of the given
Correct Answer: Option A
Note: null
MCQ 200Introduction of java
Which of the following uses three operands?
AConditional operator
BShort circuiting
CRelational operator
DShorthand assignment operator
Correct Answer: Option A
Note: null
MCQ 201Introduction of java
Which of the following has associativity from right to left?
Atype_cast
B++, - -, !
Cunary-and +
DAll of the given
Correct Answer: Option D
Note: null
MCQ 202Introduction of java
Which of the following is/are an escape characters in Java?
A\n
B\ddd
C\xdd
DAll of the given
Correct Answer: Option D
Note: null
MCQ 203Real number literals
What is an international standard for defining real numbers in java ?
AIEEE654
BIEEE555
CIEEE754
DIEEE455
Correct Answer: Option D
Note: GSEB Commerce Oct-2020
MCQ 204Variables
Which of the following words is not a reserved word?
Awhile
B$price
Cstatic
Dclass
Correct Answer: Option B
Note: GSEB Commerce Oct-2020
MCQ 205Use of brake and continue statement
Which statement is used to transfer the control outside switch or loop structure?
AContinue
BBreak
CGo
Dif รย
Correct Answer: Option B
Note: GSEB Commerce Oct-2020
MCQ 206Introduction of java
In Java, which statement is used to transfer the control outside switch or loop structure ?
Abreak
Bloop
Ccontinue
Dgo
Correct Answer: Option A
Note: S-March-2020
MCQ 207Introduction of java
In Java, which of the following is used to repeat a sequence of statements over and over until some condition occurs ?
ALoops
BRepeats
CBranches
DBreaks
Correct Answer: Option A
Note: S-March-2020
MCQ 208Introduction of java
Which of the following variable name is not valid in Java?
A_marks
B4subject
Ctotal_marks
D $age
Correct Answer: Option B
Note: March-2020 Sci,S-March-2020
MCQ 209Introduction of java
What is it called when ++ operator is used after variable name in Java?
Apost increment
Bpre increment
Cincrement pre
Dpre decrement
Correct Answer: Option A
Note: S-March-2020
MCQ 210Introduction of java
Single line comment begins with which sign in Java?
A/*
B/**
C//
DALL
Correct Answer: Option C
Note: S-March-2020
MCQ 211Introduction of java
What sign is used for creating API documentation from the code ?
A//
B/*
C*/
D/**
Correct Answer: Option D
Note: March-2015 Gen
MCQ 212Introduction of java
Java language was developed by whom?
ASun Microsystem
BOracle
CNetscape
DMicrosoft
Correct Answer: Option A
Note: S-March-2020
MCQ 213Introduction of java
In Java, which of the following is same as q && = p?
Aq = qp
Bq=q-p
Cq=q+p
Dq=q && p
Correct Answer: Option D
Note: G-March-2022
MCQ 214Introduction of java
In Java, which logical operator results in complemented result?
ANOT
BAND
COR
DXOR
Correct Answer: Option A
Note: G-March-2022
MCQ 215Introduction of java
In Java, which of the following is an invalid variable name?
AtotalAmount
Bbirth Date
C$price
Dtop5students
Correct Answer: Option B
Note: G-March-2022
MCQ 216Introduction of java
In Java, in switch statement, which of the following statements will be executed, when no match is found?
Abreak
Bdefault
Ccontinue
Dexit
Correct Answer: Option B
Note: G-March-2022
MCQ 217Introduction of java
In Java, what will be the value of variable next, where next (N%2==0)? (N/2): (3*N+1); and N is 9?
A4.5
B9
C28
DError
Correct Answer: Option C
Note: G-March-2022
MCQ 218Introduction of java
In Java, which of the following enables to take one of two alternative courses of action depending on whether the value of a given boolean valued expression is true or false?
ASwitch statement
BFor loop
CWhile loop
DIf-statement
Correct Answer: Option D
Note: G-March-2022
MCQ 219Introduction of java
Which of the following commands is used to compile the Java program?
Arun
Bexecute
Cjavac
Djava
Correct Answer: Option C
Note: G-March-2022
MCQ 220Introduction of java
Which language is considered as one of the ideal language for distributing executable programs via the World Wide Web?
ACSS
BHTML
CJavaScript
DJava
Correct Answer: Option D
Note: G-May-2019
MCQ 221Introduction of java
In Java, which of the following determines the required memory size, type of values, range of values and type of operations that can be performed?
AData Types
BOperators
CComments
DLiterals
Correct Answer: Option A
Note: G-May-2019
MCQ 222Introduction of java
Which of the following is a valid variable name in Java?
A4me
Bbirth date
Cdate
D%discount
Correct Answer: Option C
Note: G-May-2019
MCQ 223Introduction of java
In the structure of Java program, what is used as a place holder?
AText in <> brackets
BText in { } brackets
CText in ( ) brackets
DText in [ ] brackets
Correct Answer: Option A
Note: G-May-2019
MCQ 224Introduction of java
Which type of Java comment is usually used to have more than one line as comments?
ASingle-line comment
BKeyword comment
CMulti-level comment
DMulti-line comment
Correct Answer: Option D
Note: G-May-2019
MCQ 225Introduction of java
In Java, which of the following syntax is used to declare a variable?
A{type-name};
B{variable-names };
C;
D;
Correct Answer: Option B
Note: G-May-2019
MCQ 226Introduction of java
In the conditional operator of Java, which symbols are used in the expression to delimit three operands?
A?:
B+$
C#$
D#%
Correct Answer: Option A
Note: G-May-2019
MCQ 227Introduction of java
In Java, which of the following is a valid example of octal number?
A"037"
B0x2A
C-59
D\400E9
Correct Answer: Option A
Note: G-May-2019
MCQ 228Introduction of java
In Java, what are used to choose among two or more possible courses of action?
ALoops
BVariables
CClass
DBranches
Correct Answer: Option D
Note: G-May-2019
MCQ 229Introduction of java
What is the default data type of floating point literal?
Along
Bboolean
Cdouble
Dchar
Correct Answer: Option C
Note: G-May-2019
MCQ 230Introduction of java
In Java, what will be the output of 8 % 3?
A1
B0
C2
D8
Correct Answer: Option C
Note: G-May-2019
MCQ 231Introduction of java
Java supports how many basic (primitive) data types ?
A8
B2
C4
D6
Correct Answer: Option A
Note: S-March-2020
MCQ 232Introduction of java
To compile the java program we have to type what in front of source file name ?
Ajava filename.java
Bjavac filename
Cjavac filename.class
Djavac filename.java
Correct Answer: Option D
MCQ 233Introduction of java
In Java, which of the following is used to repeat a sequence of statements over and over until some condition occurs ?
ALoops
BRepeats
CBranches
DBreaks
Correct Answer: Option A
Note: S-March-2020
MCQ 234Introduction of java
In Java, a name used for constant value is known as what ?
AFunction
BOperator
CLiteral
DVariable
Correct Answer: Option C
MCQ 235Introduction of java
If a=12.5 and b=7.2, then after executing a%b, what will be the remainder?
A1
B5.3
C5
D1.22
Correct Answer: Option B
MCQ 236Introduction of java
If the conditional ternary is (N%2==0)?(N/2):(3*N+1); where N=7 then what will be the value of variable next?
A22
B7
C3.5
D0
Correct Answer: Option A
MCQ 237Introduction of java
do โฆ.. while loop is which type of loop ?
ALoop controlled
BBreak controlled
CExit controlled
DEntry controlled
Correct Answer: Option C
MCQ 238Introduction of java
To use a labeled loop, which symbol is added before the loop?
A*
B$
C:
D@
Correct Answer: Option C
MCQ 239Introduction of java
From the following which methods are used to display results?
ASystem.out.print()
BSystem.out.println()
CBoth (A) & (B)
DSystem.out.display()
Correct Answer: Option C
MCQ 240Introduction of java
In java, the program is compiled without any error, which command is used to execute it?
ATools -> Go
BTools -> Run
CTools -> Build
DTools -> Compile
Correct Answer: Option A
MCQ 241Introduction of java
From the following which are the examples of reserved words in Java?
Aclass
Bpublic
Cstatic
DAll of these
Correct Answer: Option D
MCQ 242Introduction of java
In java, at which level platform โindependence is possible due to bytecode interpreter?
Abrowser
Bsource
Cmachine
Dbinary
Correct Answer: Option D
MCQ 243Introduction of java
In java, variable name should begin with which of the following?
AAlbhabet
BUnderscore
CDollar
DAll of these
Correct Answer: Option D
MCQ 244Introduction of java
Arithmetic operators in java, can be applied on which numeric data?
Ashort
Bfloat
Cdouble
DAll of these
Correct Answer: Option D
MCQ 245Introduction of java
Java language was developed by whom?
ASun Microsystem
BOracle
CNetscape
DMicrosoft
Correct Answer: Option A
Note: S-March-2020
MCQ 246Introduction of java
The alphabet D in JDK stands for which of the following?
ADepartment
BDevelopment
CDesign
DDesktop
Correct Answer: Option B
MCQ 247Introduction of java
In Java, which of the following is same as q && = p?
Aq = qp
Bq=q-p
Cq=q+p
Dq=q && p
Correct Answer: Option D
Note: G-March-2022
MCQ 248Introduction of java
In Java, which escape code represents โcarriage returnโ?
A\n
B\r
C\t
D\f
Correct Answer: Option B
Note: G-March-2022
MCQ 249Introduction of java
In Java, in switch statement, which of the following statements will be executed, when no match is found?
Abreak
Bdefault
Ccontinue
Dexit
Correct Answer: Option B
Note: G-March-2022
MCQ 250Introduction of java
In Java, which of the following determines the required memory size, type of values, range of values and type of operations that can be performed?
AData Types
BOperators
CComments
DLiterals
Correct Answer: Option A
Note: G-May-2019
MCQ 251Introduction of java
In the conditional operator of Java, which symbols are used in the expression to delimit three operands?
A?:
B+$
C#$
D#%
Correct Answer: Option A
Note: G-May-2019
MCQ 252Introduction of java
In Java, which of the following is a valid example of octal number?
A"037"
B0x2A
C-59
D\400E9
Correct Answer: Option A
Note: G-May-2019
MCQ 253Introduction of java
In Java, what are used to choose among two or more possible courses of action?
ALoops
BVariables
CClass
DBranches
Correct Answer: Option D
Note: G-May-2019
MCQ 254Introduction of java
How many bytes are occupied by int data type in Java?
A2
B4
C6
D8
Correct Answer: Option B
Note: null
MCQ 255Introduction of java
In Java, arithmetic operation, when both operands are of different data types, lower range data type is implicitly converted to higher data type. This type of conversion is known as _______
ATypecasting
BPromotion
CA or B
DNone of the given
Correct Answer: Option B
Note: null
MCQ 256Introduction of java
The unicode code sequence \u2122 produces a ________________________ symbol.
ATM
Bยฎ
Cยฉ
D@
Correct Answer: Option A
Note: null
MCQ 257Introduction of java
In Java, there are ______ kind of variables.
A2
B3
C4
D5
Correct Answer: Option B
Note: null
MCQ 258Introduction of java
A unicode literal consists of ____________ followed by four hexadecimal digits.
A\u
B\ul
Cox
DOX
Correct Answer: Option A
Note: null
MCQ 259Introduction of java
In short circuiting, if first operand is true in ____ there is no need to evaluate second operand.
A&&
B||
C!
D?:
Correct Answer: Option B
Note: null
MCQ 260Introduction of java
Single line comment begins with which sign in Java?
A/*
B/**
C//
DALL
Correct Answer: Option C
Note: S-March-2020
MCQ 261Introduction of java
In case of short circuiting-as logical operator _________________ results in false when any one of the operands is false, there is no need to evaluate second sub-expression.
A||
B& &
C?:
D*=
Correct Answer: Option B
Note: null
MCQ 262Introduction of java
In Java, a block statement is a group of statements enclosed between which bracket ?
A< >
B( )
C[ ]
D{ }
Correct Answer: Option D
MCQ 263Introduction of java
In Java, variable name should begin with which of the following ?
AUnderscore (_)
BAll of these
CAlphabet
DDollar sign ($)
Correct Answer: Option B
MCQ 264Introduction of java
In Java, what is the default value of Boolean data type ?
ATRUE
B1
C0
DFALSE
Correct Answer: Option D
MCQ 265Introduction of java
Control structure branches are used to choose among two or more possible courses of action, is called as what ?
AMore structure
BLoop structure
CAddition structure
DSelective structure
Correct Answer: Option D
MCQ 266Introduction of java
In java, the program is compiled without any error, which command is used to execute it?
ATools -> Go
BTools -> Run
CTools -> Build
DTools -> Compile
Correct Answer: Option A
MCQ 267Introduction of java
From the following which is not logical operator in Java?
AAnd
BOr
CNot
DEqual
Correct Answer: Option D
MCQ 268Introduction of java
In java, at which level platform โindependence is possible due to bytecode interpreter?
Abrowser
Bsource
Cmachine
Dbinary
Correct Answer: Option D
MCQ 269Introduction of java
In Java, which escape code represents โcarriage returnโ?
A\n
B\r
C\t
D\f
Correct Answer: Option B
Note: G-March-2022
MCQ 270Introduction of java
For which of the following, break statement is used within switch statement?
ATo end the switch statement
BTo repeat switch statement
CTo end the program
DAll of the given
Correct Answer: Option A
Note: null
MCQ 271Introduction of java
In Java, names of __________________ begin with upper case letters.
Aclass
Bvariable
Cmethod
DBoth B and C
Correct Answer: Option A
Note: null
MCQ 272Introduction of java
In case of short circuiting-as logical operator _________________ results in false when any one of the operands is false, there is no need to evaluate second sub-expression.
A||
B& &
C?:
D*=
Correct Answer: Option B
Note: null
MCQ 273Introduction of java
In Java, there are ______ kind of variables.
A2
B3
C4
D5
Correct Answer: Option B
Note: null
MCQ 274Introduction of java
A unicode literal consists of ____________ followed by four hexadecimal digits.
A\u
B\ul
Cox
DOX
Correct Answer: Option A
Note: null
MCQ 275Introduction of java
In Java, what will be the output of 8 % 3?
A1
B0
C2
D8
Correct Answer: Option C
Note: G-May-2019
MCQ 276Introduction of java
If a=12.5 and b=7.2, then after executing a%b, what will be the remainder?
A1
B5.3
C5
D1.22
Correct Answer: Option B
MCQ 277Introduction of java
From the following which methods are used to display results?
ASystem.out.print()
BSystem.out.println()
CBoth (A) & (B)
DSystem.out.display()
Correct Answer: Option C
MCQ 278Introduction of java
From the following which are the examples of reserved words in Java?
Aclass
Bpublic
Cstatic
DAll of these
Correct Answer: Option D
MCQ 279Introduction of java
Arithmetic operators in java, can be applied on which numeric data?
Ashort
Bfloat
Cdouble
DAll of these
Correct Answer: Option D
MCQ 280Introduction of java
How many bytes are occupied by int data type in Java?