wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JAVA MCQ COMPUTER CLASS IX

Total questions: 61

Worksheet time: 31mins

Name
Class
Date
1.

Procedure oriented programming gives importance to

a)

instruction only

b)

Data only

c)

Instructions and data both

d)

none of these

2.

POP mainly uses

a)

Top down approach

b)

Bottom up approach

c)

Top down and bottom of both

d)

None of these

3.

object oriented programming mainly

a)

top down approach

b)

Bottom up approach

c)

Both of these

d)

None of these

4.

An object belonging to particular class is known as __________ of class

a)

Interface

b)

instance

c)

Alias

d)

Member

5.

object that share same attributes and behavior are grouped together into an

a)

Instance

b)

interface

c)

class

d)

Alias

6.

________________Is it technique opening both data and function together to keep them safe from unauthorized access and misuse

a)

Abstraction

b)

inheritance

c)

Polymorphism

d)

Encapsulation

7.

____________Is the feature by means of which one class acquire the property of another class

a)

Abstraction

b)

Inheritance

c)

Polymorphism

d)

Encapsulation

8.

The term oop stands for

a)

object oriented procedure

b)

object oriented packet

c)

object oriented programming

d)

object orientation procedure

9.

java applications are_________

a)

platform independent

b)

platform dependent

c)

do not need any platform to run

d)

cannot run on windows

10.

JVM stands for

a)

java virtual machine

b)

java video monitor

c)

java visual monitor

d)

java virtual monitor

11.

JRE stands for

a)

java runtime editor

b)

java runtime environment

c)

java runtime expression

d)

java runtime enabler

12.

java uses _______ for execution

a)

compiler interpreter

b)

compiler

c)

interpreter

d)

none

13.

The program that translates code written in high level language into machine code is called________

a)

assembler

b)

compiler

c)

linker

d)

none

14.

A program that translates an assembly language program into machine code is called____________

a)

assembler

b)

compiler

c)

interpreter

d)

none

15.

java is _______

a)

robust

b)

secure

c)

object oriented

d)

all of above

16.

java can be used to write_________

a)

stand alone application only

b)

internet applets

c)

both a and b

d)

none

17.

java applications can run on

a)

Windows

b)

unix

c)

mac

d)

All

18.

an object has _____

a)

attribute

b)

behaviour

c)

state

d)

all

19.

A class is _________

a)

object factory

b)

a specification of objects

c)

blueprint to create objects

d)

all

20.

____________ represents an entity in the real world with its identity and behavior

a)

class

b)

objects

c)

procedure

d)

function

21.

_____________is a template to create similar objects that share common characteristics and behavior

a)

a function

b)

an attribute

c)

a procedure

d)

a class

22.

the value of an object's_______ represents the state of the object

a)

methods

b)

procedure

c)

attribute

d)

classes

23.

The term objects and ____________are often interchangeable

a)

instance

b)

attribute

c)

behaviour

d)

state

24.

ASCII stands for______

a)

American standard code for information interchange

b)

American simulated code for information interchange

c)

American standard code for interchange of information

d)

American standard code for interaction of information

25.

ASCII is _____

a)

6 bit set of codes

b)

7 bit set of codes

c)

8 bit set of codes

d)

16 bit set of codes

26.

Extended ASCII is

a)

6 bit set of codes

b)

7 bit set of codes

c)

8 bit set of codes

d)

16 bit set of codes

27.

Which of the following is not a token?

a)

keyword

b)

operator

c)

identifier

d)

procedure

28.

Which of the following is a keyword?

a)

chracter

b)

object

c)

break

d)

attribute

29.

Which of the following is not a legal identifier?

a)

_age

b)

9thclass

c)

$Amount

d)

nullValue

30.

Which of the following is an invalid integer?

a)

1999

b)

1999 99

c)

1999999

d)

19

31.

Which of the following is not a character literal?

a)

'\t'

b)

"\t"

c)

't'

d)

all

32.

Which of the following punctuator is a statement Terminator in Java?

a)

;

b)

,

c)

.

d)

?

33.

Which of the following is not a primitive data type in Java?

a)

boolean

b)

float

c)

short

d)

class

34.

Which of the following is the size of a long data type in Java?

a)

32 bits

b)

48 bits

c)

64 bits

d)

none

35.

Which of the following is the size of a boolean data type in Java?

a)

1 bit

b)

1 byte

c)

16 bits

d)

boolean data type does not hold any space

36.

And operator taking only single operand for its operation is called

a)

unary operator

b)

ternary operator

c)

binary operator

37.

which one of the following is not a binary operator?

a)

AND

b)

==

c)

%

d)

!

38.

which one of the following is not a valid operator in java

a)

<=

b)

!=

c)

!==

d)

==

39.

the statement i=i+1 is equivalent to

a)

i++

b)

++i

c)

i+=1

d)

all

40.

for x=5 the statement sum = ++x + 8 evaluates to

a)

sum= 13

b)

sum = 15

c)

sum = 14

d)

sum = 16

41.

the statement (1>0) &&(1<0)

a)

0

b)

1

c)

false

d)

true

42.

the statement (1>0) || (1<0) evaluates to

a)

0

b)

1

c)

true

d)

false

43.

the statement (1==1)?1:0 evaluates to

a)

0

b)

1

c)

false

d)

true

44.

the expression 13/3 gives the output

a)

4

b)

3

c)

0

d)

1

45.

the expression 13%3 gives the output

a)

4

b)

2

c)

3

d)

1

46.

The statement System.out.println("six"+3+3); gives the output

a)

six 33

b)

33 six

c)

six 6

d)

6 six

47.

the expression 4+8%2 gives the output

a)

6

b)

8

c)

4

d)

none

48.

single line comments can be added using

a)

//

b)

/* */

c)

\\

d)

both a and b

49.

which keyword do you use do you include a class in your program?

a)

import

b)

export

c)

new

d)

include

50.

our default delimiter using scanner class is

a)

comma

b)

Whitespace

c)

colon

d)

there is no default delimiter

51.

which package would you import to display the date and time

a)

java.util

b)

java.io.*

c)

java.Date

d)

java.lang.*

52.

which package would you import for the Scanner class ?

a)

java.util.*

b)

java.io.*

c)

java.awt.*

d)

java.lang.*

53.

errors occurring program when

a)

the program does not run properly or does not execute at all

b)

the program produce an incorrect result

c)

syntax of programming language is not followed

d)

all of the above

54.

Which java package include math class

a)

java.io

b)

java.util

c)

java.lang

d)

java.sys

55.

Give the output of Math.sqrt(x); when x=9.0

a)

3

b)

3.0

c)

3.00

d)

all

56.

Give the output of Math.ceil(46.6)

a)

46.6

b)

47.0

c)

46.5

d)

all

57.

give the output of Math.abs(x); when x=-9.99

a)

-9.99

b)

0.99

c)

9.99

d)

none

58.

which of the following is a method to find the square root of a number

a)

FindSqureRoot(x)

b)

Math.Square(x)

c)

Sqrt(x)

d)

Math.sqrt(x)

59.

Give the output of Math.pow(2,0)

a)

0.0

b)

1.0

c)

2.0

d)

-1.0

60.

Math.random() returns a double value r such that

a)

0.0<= r <1.0

b)

0.0< r <=1.0

c)

0.0<= r <=1.0

d)

0.0<=r <1.0

61.

Give the output of Math.floor(46.6)

a)

46.5

b)

-46.0

c)

47.0

d)

46.0