Java - Beginning to Inheritance

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

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 17 people
870 days ago
5.0(1)
note Note
studied byStudied by 69 people
880 days ago
5.0(3)
note Note
studied byStudied by 15 people
100 days ago
4.0(1)
note Note
studied byStudied by 8 people
672 days ago
5.0(1)
note Note
studied byStudied by 11 people
880 days ago
5.0(1)
note Note
studied byStudied by 9 people
187 days ago
5.0(1)
note Note
studied byStudied by 90 people
772 days ago
4.5(4)
note Note
studied byStudied by 6047 people
690 days ago
4.8(33)

Explore top flashcards

flashcards Flashcard (32)
studied byStudied by 8 people
169 days ago
5.0(1)
flashcards Flashcard (542)
studied byStudied by 32 people
836 days ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 17 people
740 days ago
5.0(1)
flashcards Flashcard (342)
studied byStudied by 6 people
667 days ago
5.0(1)
flashcards Flashcard (42)
studied byStudied by 106 people
858 days ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 39 people
304 days ago
5.0(1)
flashcards Flashcard (60)
studied byStudied by 22 people
292 days ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 144 people
716 days ago
5.0(5)
robot