100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Java Practice exam UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
26
Grade
A+
Uploaded on
24-06-2025
Written in
2024/2025

Java Practice exam UPDATED ACTUAL Exam Questions and CORRECT Answers

Institution
JAVA
Course
JAVA










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
JAVA
Course
JAVA

Document information

Uploaded on
June 24, 2025
Number of pages
26
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Java Practice exam UPDATED ACTUAL Exam Questions and
CORRECT Answers


What is output by the code below?


int[] array = {5,10,3,6,9,15};



for(int i=0; i<array.length/2; i=i+2)



{



array[i]=array[array.length-i-2];


}



System.out.println(array[0]); - 9



What is output by the code below?



String[] ray = {"abc","ade","123","234","678"};


System.out.println(ray[ray.length-2]); - 234



What is output by the code below?



String[] ray = {"abc","ade","123","234","678"};

,System.out.println(ray[3].substring(0,2) + ray[4].charAt(1)); - 237



What is output by the code below?


String[] ray = {"abc","ade","123","234","678"};



System.out.println(ray[1].charAt(2)); - e



What is output by the code below?



int[] nums = new int[10];


for (int i=0; i < nums.length; i++)



{



nums[i] = i*2;



}


System.out.println(nums[9]); - 18



What is returned by method bot given the call shown below?



//client code in the runner or main method


int[] sRay = {9,9,7,1,2,3,4,5,6,2,2,3,7,3};

, System.out.println( bot(sRay) );



//method bot


public static int bot( int[] ray )



{



int stuff = 0;



for(int i = 0; i<ray.length; i++)


if(ray[i] % 2 == 0)



stuff = stuff + ray[i];



return stuff;


} - 16



What is output by the code below?



int t = 1, amount = 0;

do{

amount = amount = 2;
t = t + 2;
$12.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
GradeVaultAcademy

Also available in package deal

Thumbnail
Package deal
JAVA Bundled Exam Questions WITH CORRECT Answer
-
36 2025
$ 467.64 More info

Get to know the seller

Seller avatar
GradeVaultAcademy Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
6 months
Number of followers
0
Documents
841
Last sold
4 months ago
GradeVault Academy.

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions