
Quiz 2

Quiz
•
Computers
•
University
•
Hard
Ms. Asst.Prof
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the length of the following array byte[] data= {12, 34, 9, 0, 62, 88 };
1
5
6
12
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code fragment:
int[] arr= {2, 4, 6, 8, 10, 1, 3, 5, 7, 9};
for(int index=0; index<5; index++)
System.out.print(arr[index]+ " ");
2 4 6 8
2 4 6 8 10
2 4 6 8 10 1
2 4 6 8 10 1 3 5 7 9
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int[] arr = { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9};
for(int index=0; index<arr.length; index++)
System.out.println(arr[index]+" ");
2 4 6 8
2 4 6 8 10
2 4 6 8 10 1
2 4 6 8 10 1 3 5 7 9
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these method of class String is used to extract a single character from a String object?
CHARTAT()
charat()
chatAt()
CharAt()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these operators can be used to concatenate two or more String objects?
+
+=
&
||
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the output of the following code fragement
int[] egArray = { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9 };
for(int index=0; index<egArray.length; index=index+2)
System.out.print(egArray[index]+ " ");
2 4 6 8 10 1 3 5 7 9
4 8 1 5 9
2 6 10 3 7
2 6 10 3 7 0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Does a programmer always know long an array will be when the program is being written?
Yes--the program will not compile without the length being declared.
No-- the array object is created when the program is running, and the length might change from run to run.
Yes-- otherwise the program will not run correctly.
No--arrays can grow to whatever length is needed.
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Lets explore Java

Quiz
•
University
9 questions
Trắc nghiệm kiến thức Java Core - Phần II

Quiz
•
University
10 questions
Programming in C

Quiz
•
University
10 questions
0xDebug - Python

Quiz
•
University
15 questions
Archivos y Colecciones

Quiz
•
University
15 questions
DATA STRUCTURES QUIZ

Quiz
•
University
15 questions
Qûîz

Quiz
•
University
15 questions
BASIC C PROGRAMMING QUIZ

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University