
E5-OOPJ
Authored by Jayanth Babu
Science
University
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
var-args means?
variable number of arguments
variety number of arguments
velocity of arguments
volume of arguments
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The purpose of var-args is to
increase length of the code
reduce the readability.
reduce the length of the code
increase number of methods
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
syntax for declaration of var-args method m1()
m1(int, ... x)
m1(int... x)
m1(int...., x)
m1(int x)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Test{
static void m1(int... x){
System.out.println("Java Lab");
}
public static void main(String[] args){
m1( );
m1(10);
m1(10,20);
m1(10,20,20);
}
}
What is the output of the program?
java lab
10,20
10,20,30
java lab
java lab
java lab
java lab
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Test{
static void sum(int... x){
int total=0;
for(int x1:x){
total=total+x1;
}
System.out.println(" "+total);
}
public static void main(String[] args){
sum( );
sum(10);
sum(10,20);
sum(10,20,30);
}
}
What is the output of the program?
0
0
10
30
60
30
60
60
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
static modifier/keyword is applicable for
only variables
only variables and methods
only methods and all classes
variables
methods
and nested classes
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If we want to create a separate copy for every object, we should go for
instance variable
static variable
object variable
int variable
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
14 questions
AC DRIVES
Quiz
•
University
15 questions
Física Final
Quiz
•
10th Grade - University
12 questions
CIENCIA Y TECNOLOGIA
Quiz
•
University
14 questions
Lab de Ideas de negocio semana 3-4
Quiz
•
University
9 questions
CBD2234 Week 1
Quiz
•
12th Grade - University
15 questions
Dynamic Parameters and Principles
Quiz
•
12th Grade - University
10 questions
Java-I-ch02_quiz01
Quiz
•
University
10 questions
Inflamação Crônica
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade