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
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
15 questions
MVC-PHP
Quiz
•
12th Grade
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
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
