OOP - Java Classes
Quiz
•
Computers
•
12th Grade - University
•
Hard
I Darmawiguna
Used 397+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of the following is a valid statement?
char[] c = new char();
char[] c = new char[5];
char[] c = new char(4);
char[] c = new char[];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct way of knowing Array Size in Java?
int[] ary;
ary.length()
int[] ary;
ary.length
int[] ary;
ary->length()
int[] ary;
ary->length
3.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
A ___________ is a pre-defined set of steps that complete a specific task, optionally based on parameter values, and optionally returning some result.
array
function
method
module
class
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Predict the output of the following program.
class A{
int a=40;//non static
public static void main(String args[]){
System.out.println(a);
}
}
Compilation Error
40
0
None of the above
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
what is the output of this question?
class Test1 {
public
static void main(String[] args)
{
int x = 20;
System.out.println(x);
}
static
{
int x = 10;
System.out.print(x + " ");
}
}
10 20
20 10
10 10
20 20
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following variable is declared as static?
Home address of a particular Student
Account number of a Customer
Company name of all Employees in an Organization
Name of a Employee
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
public class Demo
{
public void show(int a)
{
System.out.println(a);
}
public static void main(String[] args)
{
show(20);
}
}
20
No Output Displayed
a constant is passed as argument
Compile Time Error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
python quiz
Quiz
•
6th Grade - Professio...
20 questions
Control Structures C#
Quiz
•
University
11 questions
HTML Postest
Quiz
•
University
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
15 questions
Object Oriented Programming Assessment 1
Quiz
•
University
19 questions
Programación Básica Prácticas Tema 2
Quiz
•
University
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
15 questions
MVC-PHP
Quiz
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
