A ___________ is a pre-defined set of steps that complete a specific task, optionally based on parameter values, and optionally returning some result.
STATIC KEYWORD IN JAVA

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Nishat Khimani
Used 87+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
array
function
method
module
class
2.
MULTIPLE CHOICE QUESTION
30 sec • 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
3.
MULTIPLE CHOICE QUESTION
30 sec • 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
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what is the output of this question?
class Test1 {
static int x = 10;
public
static void main(String[] args)
{
Test1 t1 = new Test1();
Test1 t2 = new Test1();
t1.x = 20;
System.out.print(t1.x + " ");
System.out.println(t2.x);
}
}
10 10
20 20
10 20
20 10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this question?
class Test1 {
static int i = 1;
public static void main(String[] args)
{
for (int i = 1; i < 10; i++) {
i = i + 2;
System.out.print(i + " ");
}
}
}
3 6 9
3 6 9 …. 27
Error
none
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this question?
class Test1 {
static int i = 1;
public static void main(String[] args)
{
int i = 1;
for (Test1.i = 1; Test1.i < 10; Test1.i++) {
i = i + 2;
System.out.print(i + " ");
}
}
}
1 3 9
1 2 3 … 9
3 5 7 9 11 13 15 17 19
None
7.
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[];
Create a free account and access millions of resources
Similar Resources on Quizizz
16 questions
Java Основи

Quiz
•
11th Grade - University
20 questions
Java

Quiz
•
11th Grade
15 questions
002_Java Methods

Quiz
•
12th Grade - University
14 questions
Exploring Computer Science

Quiz
•
10th - 12th Grade
20 questions
Arrays in Java

Quiz
•
9th - 12th Grade
20 questions
JAVA FUNDAMENTALS

Quiz
•
9th - 12th Grade
15 questions
JAVA: Level-1

Quiz
•
5th - 12th Grade
19 questions
Java Method

Quiz
•
12th Grade
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
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

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

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade