java Flashcards

1
Q

What are supported platforms by Java?

A

Mac OS, Windows, Linux, Unix

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

List five features of Java

A
1 OOP
2 Robust 
3 Interpreted
4 Multithreaded
5 Multi Platform
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is Java Architecture neutral?

A

Its compiler creates an architecture neutral object file format..
The compiled source code can be executed on many preprocessors with Java runtime System.

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

How does Java enables High Performance?

A

Java uses Just In Time Compiler. This compiler converters java bycode to machine specific instruction.

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

List two Java IDE

A

Eclipse

Netbeans

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

What is an object?

A

A runtime entity whose state is in stored in fields and whose behaviours is shown via the methods.

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

What is a class?

A

A blueprint from which objects are created.

It contains the fields and methods to describe the state of the object.

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

What type of variables can a class consists of ?

A
  • Local
  • Instance variable
  • Class variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a local variable?

A

Variables created inside the method, blocks or constructors.

The variable will be created and initialized within this..

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

What are instance variable

A

The variables created within a class but outside the 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
11
Q

When are the instance variables initialized?

A

when the class is loaded

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

What is a class variable?

A

A variable created within a class but outside any methods and declared with a static keyword.

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

What is singleton class

A

It controls object creation generally limiting the number to one but allowing the flexibility to change and allowing more creation of objects should they be required.

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

What is a constructor?

A

Used to create an instance of a class.

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

List three steps of creating an object?

A
  1. Object is declared
  2. Instantiated
  3. Initialized
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the default for float/double datatype?

A
  • 0.0f

- 0.0d

17
Q

What is a static variable?

A

Same as class variables. They are created within a class but outside methods, constructors, blocks with the static keyword.

18
Q

What is access modifier?

A

that controls access to classes, variables, methods, etc

19
Q

What is protected access modifier?

A

variables, methods and constructors which are declared protected can be accessed by the subclass of the other package and any class within the same package of the protected member’s class.

20
Q

What is synchronized ?

A

An modifier that controls an object’s access to shared resource.

21
Q

Which Operator is at the highest precedence?

A

()

[]