freetests4u.com

Online knowledge sharing platform

CDAC-CCEE Java Mock test -4 (15 questions, time 15 minutes)

1.
Which of the following method from super class which do not inherited in subclass ?

Constructor
Deconstructor
Copy constructor
None of these
Constructor
2.
Which of these keywords is used to refer to member of base class from a sub class ?

upper
super
this
None of the mentioned
super
3.
Why we use array as parameter in main method ?

It is syntax
Can store multiple values
Both of above
None of above
Can store multiple values
4.
Which of the following is NOT true about main method ?

We can overload main method
In a single package there can be only one main method
In a package there we can write main method per class
Main method is entry point method
In a single package there can be only one main method
5.
Select correct choice regarding up casting

Explicit typecasting is not mandatory in up casting.
In case of up casting, using super class reference variable, we can access fields of subclass
Both A and B are correct
Neither A and B is correct
Explicit typecasting is not mandatory in up casting.
6.
Which of these is correct way of inheriting class A by class B ?

class B + class A {}
class B inherits class A {}
class B extends A {}
class B extends class A {}
class B extends A {}
7.
Which of the following are java reserved keywords ?

1.run
2.import
3.default
4.implement

1 and 2
2 and 3
3 and 4
2 and 4
2 and 3
8.
Which of these is an incorrect statement ?

It is necessary to use new operator to initialize an array.
Array can be initialize using comma separated expressions surrounded by curly braces.
Array can be initialized when they declared.
None of the mentioned.
It is necessary to use new operator to initialize an array.
9.
Which will legally declare, construct, and initialize an array ?

int 2,3};
int 2);
int myList 2);
int myList
int myList
10.
Which will legally declare, construct, and initialize an array ?

int 2,3};
int 2);
int myList 2);
int myList
int myList
11.
Which 3 are valid declarations of a char ?

A) char c1=064770;
B) char c2=face;
C)char c3= 0xbeef;
D)char c4 = u0022;
E)char c5 =iface; F) char c6=uface;

A,B,D
A,C,F
C,E
E Only
A,C,F
12.
Argument passed to a program at run time is stored in __________

string array passed to parameter of main() method
Integer array passed to parameter of main() method
object array passed to parameter of main() method
string array passed to parameter of public class constructor.
string array passed to parameter of main() method
13.
Java programs are

Platform dependent
Interpreter dependent
Platform Independent
Interpreter Independent
Platform Independent
14.
Which is not valid statement based on given code ?

Class A{ }
Class B extends A{ }

A a = new A( );
B b = new B( );
A a = new B( );
B b = new A( );
B b = new A( );
15.
Which notation is used for newline in java ?




u

16.
Which operator is used to check object type at run time ?

ternary operator
instance of operator
type operator
length operator
instance of operator


CDAC CCAT Mock Tests

CDAC-CCAT test 1 (section A)

CDAC-CCAT test 2 (section A)

CDAC-CCAT test 3 (section A)

CDAC-CCAT test 4 (section A)

CDAC-CCAT test 5 (section A)

CDAC-CCAT English test (section A)

CDAC-CCAT test 1 (section B)

CDAC-CCAT test 2 (section B)

CDAC-CCAT test 3 (section B)

CDAC-CCAT test 4 (section B)