GSEB: STD:12: COMPUTER STUDIES 2014-2015: CH. NO. 7 (Reference Guide with Answers highlighted)
1)
Java is an object-oriented programming
language developed by…………
(a)
Oracle
(b) Sun Microsystems
(c)
Unix
(d)
Netscape
2)
……………… is
a company best known for its
high-end Unix workstations.
(a)
Oracle
(b) Sun Microsystems
(c)
Unix
(d)
Netscape
3)
Modeled after C++, the ………… language was
designed to be small, simple and portable across platforms and operating
systems both at the source and at the binary level.
(a) Java
(b)
C
(c)
Basic
(d)
PHP
4)
Java language was developed at sun
Microsystems in……….. .
(a)
1993
(b)
1992
(c) 1991
(d)
1990
5)
………. Is small, fast, efficient and easily
portable to a wide range of hardware devices.
(a) Java
(b)
C
(c)
Basic
(d)
PHP
6)
………….. language is considered as one of
the ideal language for distributing executable programs via the world wide web.
(a) Java
(b)
C
(c)
Basic
(d)
PHP
7)
Java is also a general-purpose
programming language for developing programs that are easily usable and
portable across different…………
(a)
tables
(b)
stands
(c)
libraries
(d) platforms
8)
Java is an……. Language and here it
differs fro C.
(a)
procedure-oriented
(b)
structure-oriented
(c) object-oriented
(d)
executable-oriented
9)
Using ……….. one can take full advantage
of object-oriented methodology and its capabilities of creating flexible,
modular and reusable code.
(a) Java
(b)
C
(c)
Basic
(d)
PHP
10)
Java includes a set of …….. that provide
basic data types, system input and output capabilities and other utility
functions.
(a) class libraries
(b)
class function
(c)
class methods
(d)
all of these
11)
These basic classes are part of the………… .
(a)
KDJ
(b) JDK
(c)
DKJ
(d)
DJK
12)
……………. Has classes to support networking
toolkit functions.
(a)
KDJ
(b) JDK
(c)
DKJ
(d)
DJK
13)
………….. is platform-independent at both
the source an binary level.
(a)
Java
(b)
C
(c)
Basic
(d)
PHP
14)
…………..independence is a program’s
capability of being moved easily from one computer systems to another.
(a)
Table
(b)
Program
(c)
Library
(d)
Platform
15)
At the …………level , java’s primitive data
types have consistent sizes across all development platforms.
(a)
beginning
(b)
destination
(c)
source
(d)
binary
16)
At……… level, platform-independence is
possible due to bytecode interpreter
(a)
beginning
(b)
destination
(c)
Source
(d)
binary
17)
The designers of Java chose to use a
combination of…….. and interpretation.
(a)
assembling
(b)
aompilation
(c)
togetherness
(d)
all of these
18)
full form of JDK is…………. .
(a)
Java Developing Kit
(b)
Java Developing Kit
(c)
Both (A) and (B)
(d)
None of these
19)
Programs written in Java are compiled
into ………….language for a computer that
doesn’t really exist.
(a)
Machine
(b)
Assembly
(c)
C++
(d)
Java
20)
The so-called “virtual” computer is known
as……… .
(a)
JMV
(b)
VMJ
(c)
JVM
(d)
MVJ
21)
The full form of JVM is ………….
(a)
Java
Virtual Machine
(b)
Java Visible Machine
(c)
Java Viable Machine
22)
The
machine language for the Java
Virtual Machine is called Java…………
(a)
byte
(b)
byte numbers
(c)
bytecode
(d)
bytes
23)
Different Java bytecode ……… is needed for
each type of computer.
(a)
compiler
(b)
interpreter
(c)
translator
(d)
none of these
24)
Java binary files are actually in a form
called ………… that is not specific to any one processor or any operating system.
(a)
bytes
(b)
byte numbers
(c)
bytecodes
(d)
byte
25)
A disadvantage of using……… is its slow
execution speed.
(a)
ASCII codes
(b)
binary numbers
(c)
bytecodes
(d)
bytes
26)
There are tools available tools to
convert………….. into native code.
(a)
Java Bytecodes
(b)
Java Language
(c)
Java Complies
(d)
All of these
27)
……………code is faster to execute, but then
it does not remain machine independent.
(a)
Native
(b)
Original
(c)
ASCII
(d)
Binary
28)
A Java program is composed of…………..
(a)
functions
(b)
classes
(c)
programs
(d)
variables
29)
A java program should have at least
one…….. and it must have main………..in it.
(a)
class, procedure
(b)
class, variable
(c)
class, method
(d)
class, code
30)
C
programmer can think of a class as a sort of creating new composite data type by using
………….and……….. .
(a)
structures, type
(b)
functions, define
(c)
classes, typedef
(d)
struct, typedef
31)
,………….. can provide much more than just a
collection of data.
(a)
function
(b)
classes
(c)
programs
(d)
variables
32)
Note that…………..is not available in Java.
(a)
typedef
(b)
struct
(c)
both (a) and (b)
(d)
All of these
33)
Java source file can be created using any
plain ……………text editor.
(a)
native
(b)
original
(c)
ASCII
(d)
binary
34)
Java……… files are given the same name as
the class defined with an extension of java.
(a)
beginning
(b)
destination
(c) source
(d)
binary
35)
In java the …….. name is case sensitive.
(a)
folder
(b) class
(c)
first
(d)
last
36)
in java the ………. Name is case sensitive.
(a) file
(b)
folder
(c)
first
(d)
last
37)
if class name is callcost, filename
should be …………… .
(a)
callcost
(b)
callcost.java
(c) callCost.java
(d)
callcost.java
38)
The source file is compiled using
the………….compiler
(a)
SciTE
(b)
C++
(c)
Basic
(d) Java
39)
To compile the Java program, type ………….
Followed by the name the source file.
(a) Javac
(b)
JavaC
(c)
Java
(d)
cjava
40)
when the program gets compiled without errors, compiler
created a file with extension ………..in the same directory as the source file.
(a)
.java
(b)
.javac
(c) .class
(d)
.javaclass
41)
The programmer can run the application
using Java………… .
(a)
complier
(b)
translator
(c)
interpreter
(d)
none of these
42)
The programmer can run the application
using java……………
(a)
JDK
(b)
JKD
(c)
JDD
(d)
JKK
43)
Which of the following variable
declarations is correct ?
(a)
double balance
(b)
double rate
(c)
double duration
(d)
double cost
44)
Java source program file should have
extension …………… .
(a)
.java
(b)
.javac
(c)
.class
(d)
.javaclass
45)
The name of………. Is same as the class name
containing main method and it has an extension.class.
(a)
interpreted file
(b)
code file
(c)
compiled file
(d)
bytecode file
46)
A……….. ‘java’ interprets bytecode and
excuses it .
(a)
compiler
(b)
translator
(c)
interpreter
(d)
none of these
47)
the texts after…….. are comments.
(a)
//
(b)
\\
(c)
// //
(d)
\\ \\
48)
The text enclosed within ……… are
comments.
(a)
/& and &/
(b)
/*and */
(c)
/* and *\
(d)
//* and *//
49)
Comments are not compiled or interpreted.
(a)
Codes
(b)
Classes
(c)
Comments
(d)
Methods
50)
Variables are declared using………. Followed
by variable name.
(a)
data type
(b)
int
(c)
char
(d)
float
51)
computation part contains expressions
including assignment ……. .
(a)
sentences
(b)
numericals
(c)
operators
(d)
statements
52)
Several ………….. (also called function or
method in java) call statements are used to display information to the used to
display information to the user the of the program.
(a)
super routine
(b)
subroutine
(c)
sub program
(d)
none of these
53)
…………. Are used to display results.
(a)
Methods
(b)
Classes
(c)
Outputs
(d)
Prints
54)
System.out.print and system.out.println
are ………… which take a value to be displayed as an argument.
(a)
methods
(b)
classes
(c)
outputs
(d)
prints
55)
…………. Adds a line feed after the end of
the information that it displays.
(a)
out.print
(b)
out.println
(c)
output.print
(d)
output.println
56)
when the program is run, the java interpreter
calls the………. Method and the statements
(a)
main()
(b)
string[]
(c)
sting[] args
(d)
main()
57)
The ……………. routine can call other
subroutines other are defined in the same class or even in other classes.
(a)
main()
(b)
string[]
(c)
sting[] args
(d)
main()
58)
It is the ……… routine that determines how
and in what the other subroutines are used.
(a)
main()
(b)
string[]
(c)
sting[] args
(d)
main()
59)
the word……… in the first line of main()
means that this routine can be called from outside the program.
(a)
private
(b)
public
(c)
public
(d)
private
60)
This is essential because the main()
routine is called by the java interpreter, which is………. To the program.
(a)
external
(b)
internal
(c)
outside
(d)
inside
61)
………….editor is used to create java
application.
(a)
Notepad
(b)
Wordpad
(c)
SciTE
(d)
Word
62)
Start SciTE application. Select fil ……. .
(a)
Save
(b)
New
(c)
Open
(d)
Start
63)
To save the file, select file……. Command.
(a)
Save
(b)
New
(c)
Open
(d)
Start
64)
To compile a source program use……….. compile command.
(a)
File
(b)
Edit
(c)
Tools
(d)
Buffers
65)
If the program is compiled without any
error, execute it using…… Go commend.
(a)
File
(b)
Edit
(c)
Tools
(d)
Buffers
66)
Programming………… differ from ordinary
human languages in being completely unambiguous and very strict about what is
and is not allowed in a program.
(a)
Rules
(b)
Methods
(c)
Files
(d)
Languages
67)
The rules that determine what is allowed
to be used in a language are called the ……………. Of the language.
(a)
protocols
(b)
syntax
(c)
methodology
(d)
regulations
68)
…………. rules specify the basic vocabulary
of the language and how program can be constructed using things like variables,
expression, statements, branches, loops and methods.
(a)
Protocol
(b)
Syntax
(c)
Methodology
(d)
Regulation
69)
A syntactically correct program is one
that can be successfully ………. Or interpreted.
(a)
Complied
(b)
Understood.
(c)
Executed
(d)
Put together
70)
In a java program, text in…… bracket is
used as a placeholder that describes something as a placeholder that describes
something actual we need to type while writing actual program.
(a)
Curly
(b)
Square
(c)
Angle
(d)
Round
71)
Which of the following is an angle
bracket ?
(a)
< >
(b)
{ }
(c)
( )
(d)
[ ]
72)
The definition of the method (function)
in java consists of function header and the sequence of statements enclosed
between braces……….. .
(a)
< >
(b)
{ }
(c)
( )
(d)
[ ]
73)
As
java is an object-oriented language.
(a)
program
(b)
procedure
(c)
list
(d)
class
74)
A method in java program cannot
exist by itself. It has to be a part of
a ………… .
(a)
program
(b)
procedure
(c)
list
(d)
class
75)
Based on the structure of a java program
………….in the first line is the name of the class having main method in it.
(a)
<class-name>
(b)
public
(c)
class
(d)
name
76)
If the name of the class is CallCost,
then the program should conventionally be saved in a java source file with a
name……….. .
(a)
CallCost.class
(b)
CallCost.java
(c)
Callcost.java
(d)
Callcost
77)
When this file is compiled, another file
named ……….. is generated.
(a)
CallCost.class
(b)
CallCost.java
(c)
Callcost.java
(d)
Callcost
78)
Class file, CallCost.class, contains the
translation of the program into java……………., which can be executed by a java
interpreter.
(a)
bytes
(b)
binary number
(c)
bytecode
(d)
byte
79)
variable and method declaration after and
before………. Method is optional .
(a)
mani()
(b)
string[]
(c)
string[] args
(d)
main()
80)
Each program must have one……… that
contains public method main().
(a)
Program
(b)
Procedure
(c)
List
(d)
Class
81)
Java is a…….. format language.
(a)
free
(b)
busy
(c)
object
(d)
class
82)
The entire java program can be written
together on single line but……. Is important to make it more readable.
(a)
display
(b)
layout
(c)
plan
(d)
design
83)
A program can contain other methods
besides ………….. as well as other variables.
(a)
Main()
(b)
String[]
(c)
string[] args
(d)
main()
84)
Which of the following are the basic java
statements used within a method definition such as main() ?
(a)
Data Types
(b)
Variables
(c)
Literals
(d)
All of these
85)
Which of the following are the basic java
statements used within a method definition such a main() ?
(a)
Comments
(b)
Java statements and expressions
(c)
Arithmetic operators
(d)
All of these
86)
Which of the following are the basic java
statements used within a method definition such a main() ?
(a)
Comparisions
(b)
Logical operators
(c)
Both (A) and (B)
(d)
None of these
87)
…………. Determines the required memory
size, type of values, range of values and type of operations that can be
performed.
(a)
data Types
(b)
variables
(c)
literals
(d)
all of these
88)
Java supports…………… primitive data types
that handle common types for integers, floating-point numbers, characters and
Boolean values (true of false).
(a)
seven
(b)
eight
(c)
nine
(d)
ten
89)
the primitive ……. are named byte, short,
int, long, float, double, char,Boolean.
(a)
data types
(b)
variables
(c)
literals
(d)
all of these
90)
The first four data types hold……….. .
(a)
Real numbers
(b)
integers
(c)
single character
(d)
true or false
91)
The next two data types hold……. .
(a)
real number
(b)
integers
(c)
single character
(d)
true or false
92)
The Boolean data type holds one of the
two logical values true of false.
(a)
Real numbers
(b)
Integers
(c)
Single character
(d)
True or false
93)
The Boolean data type holds one of the
two logical values true or false.
(a)
Real numbers
(b)
Integers
(c)
Single character
(d)
True or false
94)
The data types in java are called………. As
they are built into the system.
(a)
fixed
(b)
ancient
(c)
primitive
(d)
new
95)
in java the…….. are machine-independent,
this means that they can be relied on their sizes and characteristic to be
consistent across all java programs on
all machines.
(a)
data types
(b)
variables
(c)
literals
(d)
all of these
96)
integer numbers with b bits………. Store
signed values in the range of (-2b-1-1, 2b-1).
(a)
accuracy
(b)
precision
(c)
exactness
(d)
vagueness
97)
when the integer numbers are preceded
with keyword…………the values are in the range of keyword………, the values are in
the range of (0, 2b-1).
(a)
signed
(b)
unsigned
(c)
boolean
(d)
byte
98)
……….. in java are complaint with IEEE 754
(an international standard for defining floating-point numbers and
arithmetic|).
(a)
Real numbers
(b)
Integers
(c)
Single character
(d)
True or false
99)
Java uses the Unicode…….. set.
(a)
Numerical
(b)
IEEE
(c)
Character
(d)
None of these
100)
The char type has…….. bits or precision
and is unsigned.
(a)
13
(b)
14
(c)
15
(d)
16
101)
Data type ……… is not a number,nor can it
be treated as one.
(a)
char
(b)
real
(c)
boolean
(d)
integer
102)
if anything is to be remembered by the
computer, there will be a requirement of….. during program execution. It needs
to be stored in the memory of the computer.
(a)
variable
(b)
literals
(c)
comments
(d)
operators
103)
………manipulates the data that is stored in
memory.
(a)
Information
(b)
Programs
(c)
Comments
(d)
Characters
104)
In machine language, data can only be
referred to by giving the…… address of the location in memory where it is
stored.
(a)
numerical
(b)
alphanumeric
(c)
alphabetical
(d)
real
105)
In a…….. language such as java, names are
used instead of numeric address of memory location to refer to data.
(a)
low-level
(b)
middle-level
(c)
high-level
(d)
top-level
106)
A name is used to refer to the data
stored in memory and it is called a …………….. .
(a)
variable
(b)
literal
(c)
comment
(d)
operator
107)
A………… can take different data values at
different times during the execution of the program, but it always refers to
the same memory location.
(a)
variable
(b)
literal
(c)
comment
(d)
operator
108)
A…….. can be used In a java program only
if it has been declared.
(a)
variable
(b)
literal
(c)
comment
(d)
operator
109)
One or more variables can be declared in
java using…………. Statement.
(a)
beginning
(b)
initial
(c)
declaration
(d)
comment
110)
In java, the conventional syntax of…………. Denote
the item to be specified by user.
(a)
curly brackets
(b)
square brackets
(c)
angle brackets
(d)
round brackets
111)
In java, the conventional syntax of ……………
denote the list of items separated by commas.
(a)
curly brackets
(b)
square brackets
(c)
angle brackets
(d)
round
brackets
112)
In syntax: {variable names} , it denote
the list of …………name.
(a)
variable
(b)
literal
(c)
comment
(d)
operator
113)
When the list contains more than one
item, items should be separated by ………. .
(a)
semi colon
(b)
commas
(c)
full stop
(d)
colon
114)
In typical java syntax, the
<type-name> is to be replaced with the keyword denoting the…………… of the
variables.
(a)
data types
(b)
variables
(c)
literals
(d)
comments
115)
……….. is used to determine the size of
variable, the values it can hold and the operations that can be performed on
it.
(a)
Real numbers
(b)
Variables
(c)
Data types
(d)
Floats
116)
When the compute executes a variables……..
statement, it sets aside memory for the variable and associates the variable’s
name with that memory.
(a)
data type
(b)
initial
(c)
declaration
(d)
comment
117)
which of the following examples of
variables is correct ?
(a)
Int marks;
(b)
Double amount , interest;
(c)
Float rate;
(d)
All of these
118)
which of the following rule is incorrect
while defining a variable name ?
(a)
It must begin with an alphabet,
underscore(_)
(b)
It must begin with a
percentage sign (%)
(c)
No spaces are allowed word
(d)
It cannot be a reserved word.
119)
Which of the following is true ?
(a)
Java is case-sensitive.
(b)
Java is not case-sensitive
(c)
Both (a) and (b)
(d)
None of these
120)
Upper case and lower case letters are
considered to be……..
(a)
same
(b)
similar
(c)
different
(d)
related
121)
In java, it is customary for names of ………
to begin with upper case letters.
(a)
variables
(b)
methods
(c)
comments
(d)
classes
122)
In java, it is customary for names of ………
to begin with lower case letters.
(a)
variables
(b)
methods
(c)
comments
(d)
both (a) and (b)
123)
Which of the following is not a good
programming style for declaring variables ?
(a)
Declare ten variables
in a declaration statement.
(b)
Include a comment with each variable
declaration to explain its purpose.
(c)
Declare important variables at the beginning
of the function.
(d)
None of these
124)
In java, there are …….. kinds of
variables.
(a)
one
(b)
two
(c)
three
(d)
four
125)
Which of the following is a kind of
variable in java ?
(a)
Instance variable
(b)
Class variable
(c)
Local variable
(d)
All of these
126)
Function parameters and variables
declared in the function are considered as……… variables.
(a)
External
(b)
Internal
(c)
Local
(d)
Limited
127)
Each variable can be given a ……..value
while declaring.
(a)
initial
(b)
last
(c)
cumulative
(d)
opening
128)
In general, syntax of declaring variables
is…….. .
(a)
<type name> {variable
=<value>,};
(b)
<type name>
{variable [=<value>,]};
(c)
type name {variable [=<value>,]};
(d)
<type name> {variable
[=<value>,]};
129)
In general, syntax of declaring variables
is……….. .
(a)
curly brackets { }
(b)
square brackets [ ]
(c)
angle brackets < >
(d)
round brackets ( )
130)
It is programmer’s responsibility to
assign value to…….. before their first use.
(a)
variables
(b)
methods
(c)
comments
(d)
both (a) and (b)
131)
A
name used for a constant value is known as……… .
(a)
data types
(b)
variables
(c)
literals
(d)
comments
132)
There are some different kinds of …….. in
java for number, character, string and
Boolean values.
(a)
data types
(b)
variables
(c)
literals
(d)
comments
133)
……………….. are used to represent integer or
real numbers; for example, 157 and 17.42.
(a)
Numeric variables
(b)
Numeric literals
(c)
Integer literals
(d)
Character literals
134)
……………. Are literals that are whole
numbers.
(a)
Real number literals
(b)
Integer real number literals
(c)
Integer literals
(d)
Character literals
135)
Java allows Unicode integer literals
called decimal whose base is……. .
(a)
10
(b)
8
(c)
16
(d)
32
136)
Java allows Unicode integer literals
called octal whose base is…….. .
(a)
10
(b)
8
(c)
16
(d)
32
137)
Java allows Unicode integer literals
called Hexadecimal whose base is…….. .
(a)
10
(b)
8
(c)
16
(d)
32
138)
……….. integers such as 4, 157, 17777 and
-32 are decimal integer literals of types byte, short or int depending on their
size.
(a)
Ordinary
(b)
Simple
(c)
Complicated
(d)
Real
139)
A decimal integer larger than int is
automatically of type……… .
(a)
short
(b)
long
(c)
float
(d)
mixed
140)
The user can force a smaller number to be
long by appending an……. As a suffix to that number.
(a)
S or s
(b)
A or a
(c)
L or l
(d)
M or m
141)
………….. integers are preceded by a minus
(-) sign, for example, -45.
(a)
Positive
(b)
Real
(c)
Large
(d)
Negative
142)
……………. Numbers use only the digit 0
through 7. In java, a numeric literal with a leading 0 (zero) is interpreted as
an octal number.
(a)
Hexadecimal
(b)
Octal
(c)
Decimal
(d)
Real
143)
…………… numbers use 16 digits, the usual
digits 0 to 9 and the letters A, B, C, D, E, and F.
(a)
Hexadecimal
(b)
Octal
(c)
Decimal
(d)
Real
144)
In hexadecimal, the letters……… represent
the numbers 10 to 15 respectively.
(a)
A to E
(b)
A to G
(c)
A to F
(d)
A to D
145)
In java, a……… literal begins with 0x or
0X.
(a)
Hexadecimal
(b)
Octal
(c)
Decimal
(d)
Real
146)
Examples of……….. literals are 0x45 or
0xFF7A.
(a)
hexadecimal
(b)
octal
(c)
decimal
(d)
real
147)
………. Numbers are also used in character
literals to represent arbitrary unicode characters.
(a)
Hexadecimal
(b)
Octal
(c)
Decimal
(d)
Real
148)
A………. literal consists of \u followed by
four hexadecimal digits.
(a)
Hexacode
(b)
Unicode
(c)
Bytecode
(d)
None of these
149)
For example, the character literal
‘\u00E9’ represents the ……… character that is an “e” with a n acute accent.
(a)
Hexacode
(b)
Unicode
(c)
Bytecode
(d)
None of these
150)
………….. also supports binary numbers,
using the digits 0 and 1 the prefix ob ( or 0B). for example 0b10110 or
0b101011001011.
(a)
Java 7.0
(b)
Java 7.1
(c)
Java 7
(d)
Java 8
151)
……………literals are called floating point
literals.
(a)
Real integer
(b)
Real point
(c)
Real float
(d)
Real number
152)
………… numbers can be represented using two
types of notations: standard and scientific.
(a)
Real integer
(b)
Real point
(c)
Real float
(d)
Real number
153)
In standard notations, the integer part
and the fractional part are separated with ………. For example 12.37.
(a)
Decimal point (.)
(b)
Comma (,)
(c)
Colon (:)
(d)
Semi-colon (;)
154)
In scientific notation, a number is
followed by letter………. And a signed integer exponent, for example 1.3e12 and
12.3737e-108.
(a)
X or x
(b)
S or s
(c)
E or e
(d)
Both (a) and (c)
155)
……………… format can be used to express very
large and very small numbers.
(a)
Scientific
(b)
Unicode
(c)
ASCII
(d)
Binary
156)
In java, floating point literal by
default is of the type………
(a)
long
(b)
float
(c)
double
(d)
single
157)
The suffix………. Can be written in either
lower or upper case.
(a)
F
(b)
R
(c)
X
(d)
0X
158)
For the type………… there are precisely two
literals: true and false.
(a)
integer
(b)
real
(c)
character
(d)
boolean
159)
……………. Literals are to be types without
quotes.
(a)
Integer
(b)
Real
(c)
Character
(d)
Boolean
160)
……….. literals represent values, not
variables.
(a)
Integer
(b)
Real
(c)
Character
(d)
Boolean
161)
Boolean
values occur most often as the values of conditional ………………
(a)
expression
(b)
statements
(c)
methods
(d)
true or false
162)
In C language, 0 is treated as false
and……….. value is treated as true.
(a)
number
(b)
non-zero
(c)
character
(d)
none of these
163)
in Java, literals true and false are not
associated with any …….. vallu.
(a)
ASCII
(b)
real
(c)
numeric
(d)
expression
164)
………….. literals are expressed by a single
character surrounded by single quotes.
(a)
Integer
(b)
Real
(c)
Character
(d)
Boolean
165)
Characters are stored as ……….. Unicode
character.
(a)
16-bit
(b)
8-bit
(c)
32-bit
(d)
64-bit
166)
Certain special characters have special
literals that use a ………… as an “escape character”.
(a)
Salas (/)
(b)
Back slash (\)
(c)
Both (a) and (b)
(d)
None of these
167)
‘\n’ escape code means………. .
(a)
Tab
(b)
Line
(c)
New line
(d)
Backspace
168)
‘\n’ Escape code means……….. .
(a)
Tab
(b)
Line
(c)
New line
(d)
Backspace
169)
‘\b’ Escape code means……… .
(a)
Tab
(b)
Line
(c)
New line
(d)
Backspace
170)
‘\r’ Escape code means……. .
(a)
Return
(b)
Carriage return
(c)
Rise
(d)
Real
171)
‘\f’ Escape code means……… .
(a)
Form
(b)
Form feed
(c)
Format page
(d)
Feed
172)
‘\\’ Escape code means………..
(a)
Backspace
(b)
Back slash character
(c)
Slash character
(d)
None of these
173)
\’ Escape code means……… .
(a)
Single character
(b)
Back splash character
(c)
Single quote character
(d)
Double quote character
174)
\”Escape code means………
(a)
Single character
(b)
Back splash character
(c)
Single quote character
(d)
Double quote character
175)
A………………. is a sequence of characters.
(a)
string
(b)
statement
(c)
real number
(d)
expression
176)
………….. literal is a sequence of character
enclosed in double quotes.
(a)
String
(b)
Statement
(c)
Real number
(d)
Comments
177)
Within a ……………, special characters can be
represented using the backslash notation.
(a)
string
(b)
statement
(c)
real number
(d)
expression
178)
…………. In a program are for human readers
only.
(a)
String
(b)
Statement
(c)
Real number
(d)
Comments
179)
…………. Are entirely ignored by the
computer.
(a)
String
(b)
Statement
(c)
Real number
(d)
Comments
180)
…………. Are important to make the program
easy to understand for everyone.
(a)
String
(b)
Statement
(c)
Real number
(d)
Comments
181)
Java supports ………. Types of comments.
(a)
one
(b)
two
(c)
three
(d)
four
182)
………. Comment begins with double slashes
(//) and extends till the end of line.
(a)
Multi-line
(b)
Single-line
(c)
Documentation
(d)
None of these
183)
………… comment begins with /* and ends with
*/.
(a)
Multi-line
(b)
Single-line
(c)
Documentation
(d)
None of these
184)
…….. comment type of comments begin with
/** and end with */.
(a)
Multi-line
(b)
Single-line
(c)
Documentation
(d)
None of these
185)
………….. are used for creating API
documentation from the code. These are special comments that are used for the
javadoc system.
(a)
Multi-line
(b)
Single-line
(c)
Documentation
(d)
None of these
186)
………. are an essential part of
programming.
(a)
Expression
(b)
Operators
(c)
Codes
(d)
Documentation
187)
The basic building blocks of expressions
are ……….., variables and function calls.
(a)
literals
(b)
expressions
(c)
parameters
(d)
documents
188)
A function is a ……….. that returns a
value.
(a)
routine
(b)
subroutine
(c)
procedure
(d)
expression
189)
Operators include………….. .
(a)
Arithmetic operators (+, -, *, /, % )
(b)
Comparison operators (<, >, =, . .
.)
(c)
Logical operators (and, or, not . . . )
(d)
All of these
190)
When several operators appear in an
expression, there is a question of ………. Which determines how the operators are
grouped for evaluation.
(a)
order
(b)
continuity
(c)
precedence
(d)
evaluation
191)
Multiplication (*) has a higher ………… than
addition (+).
(a)
order
(b)
continuity
(c)
precedence
(d)
evaluation
192)
if the default…….. is not what is
required, then parentheses are used to explicitly specify the grouping.
(a)
order
(b)
continuity
(c)
Precedence
(d)
Evaluation
193)
…………… are special symbols used to build
expression.
(a)
Symbols
(b)
Operators
(c)
Brackets
(d)
Documents
194)
Java supports many types of different
operators like.
(a)
Arithmetic Operators
(b)
Comparison Operators
(c)
Logical Operators
(d)
All of these
195)
Java supports many types of different
operators like.
(a)
Conditional Operators
(b)
Assignment Operators
(c)
Both (a) and (b)
(d)
None of these
196)
Which of the following is not an
arithmetic operator ?
(a)
+
(b)
!=
(c)
*
(d)
%
197)
Which of the following is not an
arithmetic operator.?
(a)
–
(b)
= =
(c)
/
(d)
%
198)
All the arithmetic operators are binary
and take ………. Operands.
(a)
two
(b)
four
(c)
six
(d)
eight
199)
which of the following is the modulus
operator. ?
(a)
+
(b)
!=
(c)
*
(d)
%
200)
With ……… operator, if first operand is
negative, the result is negative.
(a)
multiplication
(b)
addition
(c)
modulus
(d)
division
201)
Operator ……… can also be used to
concatenate a string.
(a)
/
(b)
*
(c)
+
(d)
%
202)
Unary operator ++ is called the ……..
operator.
(a)
increment
(b)
decrement
(c)
both (a) and (b)
(d)
none of these
203)
Unary operator –is called the ……….
operator.
(a)
increment
(b)
decrement
(c)
both (a) and (b)
(d)
None of these
204)
Comparison operators are also known as
……….. operators.
(a)
comparative
(b)
relational
(c)
unary
(d)
logical
205)
The meaning of A==B is ……… .
(a)
Is A “equal to” B?
(b)
Is A “not equal to” B?
(c)
Is A “less than” B?
(d)
Is A “greater than” B?
206)
The meaning of A != B is……… .
(a)
Is A “equal to” B?
(b)
Is A “not equal to” B?
(c)
Is A “less than” B?
(d)
Is A “greater than” B?
207)
……….. operators are also Boolean
operators, as they operate on Boolean operands.
(a)
Comparative
(b)
Relational
(c)
Unary
(d)
Logical
208)
In Jaya, logical operations AND is
performed using………. .
(a)
||
(b)
(c)
!
(d)
&&
209)
In java, logical operations OR is
performed using……….
(a) ||
(b)
(c)
!
(d)
&&
210)
In java, logical operations XOR is
performed using………….
(a)
||
(b)
(c)
!
(d)
&&
211)
In java, logical operations NOT is
performed using……….. .
(a)
||
(b)
(c) !
(d)
&&
212)
The conditional operator in java is a…………
. operator using three operands.
(a) ternary
(b)
relational
(c)
conditional
(d)
logical
213)
…………. Uses two symbols ? and: in the
expression to delimit three operands.
(a)
Ternary
(b) Relational
(c)
Conditional
(d)
Logical
214)
In Java, an expression containing
assignment …………operator is generally referred to as assignment statement.
(a)
= =
(b) =
(c)
!=
(d)
#=
215)
Which of the following is not an example shorthand
assignment operator ?
(a)
a + =b
(b)
q &&=p
(c) a + b = c
(d)
a - =b
216)
A…….. is used when a conversion of a
value has to be forced.
(a)
Full Cast
(b)
Operator Cast
(c)
Cast
(d) Type Cast
217)
In java, operators are evaluated as per
their precedence.
(a)
Order
(b)
Continuity
(c) Precedence
(d)
Evaluation
218)
When two operators with the same
precedence appear in the expression, the expression is evaluated according to
its………… .
(a)
Order
(b) Associativity
(c)
Precedence
(d)
Evaluation
219)
The Associativity of Unary operators is
from:
(a)
Left –to-Right
(b)
Right-to-Left
(c)
Both (a) and (b)
(d) None of these
220)
The Associativity of logical operators is
from:
(a) Left-of-Right
(b)
Right-to-Left
(c)
Both (a) and (b)
(d)
None of these
221)
The Associativity of conditional
operators is from:
(a)
Left-of-Right
(b) Right-to-Left
(c)
Both (a) and (b)
(d)
None of these
222)
The associativity of relational operators
is from:
(a) Left-of-Right
(b)
Right-to-Left
(c)
Both (a) and (b)
(d)
None of these
223)
The statements that enable the flow of
execution are considered as…….. .
(a)
blocks
(b)
structures
(c) control structures
(d)
logical structures
224)
There
are ………… types of control
structures.
(a)
one
(b) two
(c)
three
(d)
four
225)
…………. Are used to repeat a sequence of
statements over and over until some condition
occurs.
(a)
Structures
(b)
Charts
(c)
Branches
(d) Loops
226)
……… are used to choose among two or more
possible courses of action, so also called selective structure.
(a)
Structures
(b)
Blocks
(c) Branches
(d)
Loops
227)
A block statement is a group of statement enclosed between a pair
of…………. Braces.
(a) { and }
(b)
< and >
(c)
( and )
(d)
[ and ]
228)
A………… declared inside a block is
completely inaccessible and invisible from outside that block.
(a) variable
(b)
name
(c)
integer
(d)
number
229)
The…………. Of a variable defined inside a
block is limited to that block only.
(a)
area
(b)
locality
(c) scope
(d)
range
230)
the …………….. when used in a program
enables to take one of two alternative courses of action, depending on whether
the value of a given Boolean – valued expression is true of false.
(a)
Else Statement
(b) If statement
(c)
While
(d)
Do…………. While
231)
…………. Is an example of a “branching” or
“decision” or “selection” control structure.
(a)
Switch statement
(b) If statement
(c)
While
(d)
Do……… while
232)
A……….. is used when there are many
alternative actions to be taken depending upon the value of a variable or
expression.
(a) Switch statement
(b)
If statement
(c)
While
(d)
Do……… while
233)
In
the………, the test expression should be of the type byte, char short or
int. it can also be of enum data type.
(a) Switch statement
(b)
If statement
(c)
While
(d)
Do……… while
234)
Java supports …………. Type of looping
constructs.
(a)
one
(b)
two
(c) three
(d)
four
235)
which of the following is a type of
looping construct in java ?
(a)
For
(b)
While
(c)
Do……. While
(d) All of these
236)
The…………… statement is used to transfer
the control outside switch or loop structure.
(a)
For
(b)
While
(c)
Continue
(d) Break
237)
In a loop, ………….. statement is used to
exit the loop.
(a)
For
(b)
While
(c)
Continue
(d) Break
238)
Use of ……… statement is used to skip the
following statements in a loop and continue with the next iteration.
(a)
For
(b)
While
(c) Continue
(d)
Break
239)
………….. of same or different types can be
nested in java.
(a) Loops
(b)
Controls
(c)
Charts
(d)
Structures
240)
If the programmer wants to control which
loop to break and which loop to reiterate,…………. Can be used.
(a)
Labeled Controls
(b) Labelled loops
(c)
Named controls
(d)
Named loops
241)
To use a labeled loop, add the label
followed by ……….. before the loop.
(a)
Semi Colon ( ; )
(b) Colon ( : )
(c)
Full stop (.)
(d)
All of these
242)
The default value of Boolean type data is
…………… .
(a)
True
(b) False
(c)
0
(d)
1
243)
What will be the result of arithmetic expression
11/2 ?
(a)
5
(b) 5.5
(c)
1
(d)
0
244)
11%2 will give the output as…………. .
(a)
5
(b)
5.5
(c) 1
(d)
0
245)
………..character set is used for char data
type in java.
(a) Unicode
(b)
EBCIDIC
(c)
ASCII
(d)
All of these
246)
What will be the output of the expression
5*(6+2) /2?
(a)
19
(b) 20
(c)
21
(d)
22
247)
Output of 44/(6+5)*(3-1) is……… .
(a) 8
(b)
9
(c)
8.5
(d)
9.5
248)
Which of the following is error free ?
(a)
For (;;) { int i=10 };
(b)
While
(1) { int i=10) ;
(c)
While (true) {int i=1};
(d) All of these
249)
The …………… statement makes use of
branching decision making.
(a)
While
(b)
For
(c) If
(d)
Do………. While
No comments
Post your comments