Predict the output of following Java program?
class Test {
int i;
}
class Main {
public static void main(String args[]) {
Test t;
System.out.println(t.i);
}
}
Java Classes & Objects

Flashcard
•
Computers
•
University
•
Hard
Quizizz Content
FREE Resource
Student preview

3 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
Compiler Error
2.
FLASHCARD QUESTION
Front
Predict the output of following Java program: class Test { int i; } class Main { public static void main(String args[]) { Test t = new Test(); System.out.println(t.i); } }
Back
0
3.
FLASHCARD QUESTION
Front
Given that Student is a class, how many reference variables and objects are created by the following: Student studentName, studentId; studentName = new Student(); Student stud_class = new Student();
Back
Three reference variables and two objects are created.
Similar Resources on Quizizz
9 questions
Marriage and Family

Flashcard
•
University
8 questions
Understanding Accommodations and Modifications

Flashcard
•
Professional Development
2 questions
Câu hỏi về mã lập trình

Flashcard
•
University
1 questions
Lunch Hour Challenge

Flashcard
•
KG - University
10 questions
Static Methods in Java

Flashcard
•
12th Grade
10 questions
Java Flashcard 1

Flashcard
•
University
8 questions
AzM2 Part 1

Flashcard
•
Professional Development
8 questions
Privacy Concern and Ethical Use of Students' Data

Flashcard
•
Professional Development
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade