Java - Beginning to Inheritance

studied byStudied by 0 people
0.0(0)
Get a hint
Hint

what is the size of float variable?

1 / 18

flashcard set

Earn XP

Description and Tags

true or false, code snippets and definitions

19 Terms

1

what is the size of float variable?

32 bit

New cards
2

which operator is considered to be with highest precedence?

a. (), []
b. ? :
c. =
d. %

a. (), []

New cards
3

Correct syntax for the main method of a java class?
a. public static int main ( String[] args)
b. public static void main ( string[] args)
c. none of the choices
d. Public static void main (String [] args)
e. Public int main ( string [] args)

d. Public static void main (String [] args)

New cards
4

what is an applet?

java program rhat runs in a web Browser

New cards
5

static methods are allowed to access variables using this.varName. (True or False)

False. static methods cannot access instance variables (non-static variables) using this.varName, because this refers to the current instance of the class, and static methods do not belong to any particular instance — they are associated with the class itself.

New cards
6

what is method overloading?

methods with the same name but different parameters

New cards
7

Objects are stored in Stack

false

New cards
8

Size of double Variable

64 bit

New cards
9

is an empty . java file a valid source file?

True

New cards
10

Primitive variables are stored on stack

True

New cards
11

waht is the default value of String variable

null

New cards
12

Does garbage collection guarantee that a program will not run out of memory

No, garbage collection does not guarantee it will free up enough memory to prevent out-of-memory errors.

New cards
13

is it legal to access a static method using an instance of the class

True

New cards
14

size of int variable

32 bit

New cards
15

what is a local variable?

variables defined inside methods, constructors or blocks

New cards
16

Method Overloading is a n example of

dynamic binding

New cards
17

what is the default value of char variable

‘\u0000’

New cards
18

output of the code snippet
int i = 1;
switch(i){
default: System.out.println(“default’
case 0 : System.out.println(“zero”);
break;
case 1 : System.out.print(“one”);
case 2: System.out.print(“two”);
}

compile time-error. default line

New cards
19
New cards

Explore top notes

note Note
studied byStudied by 1013 people
... ago
5.0(5)
note Note
studied byStudied by 25 people
... ago
5.0(1)
note Note
studied byStudied by 352 people
... ago
5.0(2)
note Note
studied byStudied by 32 people
... ago
5.0(1)
note Note
studied byStudied by 14 people
... ago
5.0(1)
note Note
studied byStudied by 1200 people
... ago
4.5(2)
note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 32 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (103)
studied byStudied by 11 people
... ago
5.0(1)
flashcards Flashcard (84)
studied byStudied by 11 people
... ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 17 people
... ago
4.0(1)
flashcards Flashcard (28)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (673)
studied byStudied by 34 people
... ago
5.0(1)
flashcards Flashcard (73)
studied byStudied by 40 people
... ago
5.0(2)
flashcards Flashcard (64)
studied byStudied by 56 people
... ago
5.0(2)
flashcards Flashcard (50)
studied byStudied by 1 person
... ago
5.0(2)
robot