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

java Test UPDATED ACTUAL Exam Questions and CORRECT Answers

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

java Test 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
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

java Test UPDATED ACTUAL Exam Questions and CORRECT
Answers


How many parameters for: Public void compare(int x, int y, int z);


Public void go(); - Write a method signature for "go" that does not have parameters nor returns a
value


public int process (); - Write a method signature for "process" with parameters and returns a
value of type "int"


Play(); - Write a method call for "play"



if(isTouching(worm.class)

{

RemoveTouching(worm.class)

} - Write an if statement that does something to a crab


Allows access to methods of a class. We use it to change the image of a class - What is a dot
notation? and when do we use it?


Turn(Greenfoot.getRandomNumber(49); - Write a method call that will return an integer
between 0 and 49



if(Greenfoot.getRandomNumber(100)(31)

{

turnGreenfoot.getRandomNumber(17)(31);
} - Write an if statement that turns 17 degrees, but only 31 percent of the time

, if(Greenfoot.getRandomNumber(14)

{

*something*
} - Write an if statement that turns an object a random number of degrees between 0 and 14



if(Greenfoot.getRandomNumber(20)(-20)

{

turn(3);

} - Write an if statement that turns an object a random number of degrees between -20 and 20



== != > < <= >= - Write the symbols for 6 different comparisons operators


Actor - What class is Worm a subclass of?



Helps another cass look for the worm to eat it. - What is the rationale behind making a separate
method called "lookForWorm"?



Needs a capital "p" - What is wrong with naming a class in Greenfoot "pig"?



Comments are notes that don't effect your coding - What is a comment?


-Allows us to edit later on

- Help us remember something we might forget - Why do we use comment sin our programs?



// = Single line comment
/*comment*/ = multi-line comment - Write two different types of comments below and what
their use is
$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