Software Dev Exam 2016 Flashcards

1
Q

What is the size of a byte variable?

A

8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the default value of a byte variable?

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which is true about the private access modifier?

A

Variables, methods and constructors which are declared private can only be accessed by the members of the same class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an instance variable?

A

Instance variables are variables within a class but outside any method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which arithmetic operations can result in the throwing of an arithmetic exception?

A

/ & %

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following is not a keyword in Java?

A

Seal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following is true about the public access modifier?

A

Variables, methods and constructors which are declared public can be accessed by any class lying in the same package.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the size of the char variable?

A

16 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which method must be implemented by all threads?

A

Run()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the default value of short variable?

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a class in Java?

A

A class is a blueprint from which individual objects are created. A class can contain fields and methods to describe the behavior of an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a class variable?

A

Class variables are variables declared within a class, outside any method, with the static keyword.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is encapsulation?

A

It is the technique of making the fields in a class private and providing access to the fields via public methods. If a field is declared private, it cannot be accessed by anyone outside the class, thereby hiding the fields within the class. Therefore encapsulation is also referred to as data hiding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an instance variable?

A

They are variables within a class but outside any method. These variables are instantiated when the class is loaded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an applet?

A

An applet is a small internet based Java program that runs in a web browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is polymorphism?

A

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object.

17
Q

What is inheritance?

A

It is the process where one object acquires the properties of another. With the use of inheritance the information is made manageable in a hierarchical order.

18
Q

What is a local variable?

A

Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and it will be destroyed when the method has completed.

19
Q

What is abstraction?

A

It refers to the ability to make a class abstract in OOP. It helps reduce the complexity and also improves the maintainability of the system.

20
Q

What is JIT compiler?

A

JIT, which stands for Just In Time, improves the runtime performance of computer programs based on bytecode.