sugar85
Newbie level 4
- Joined
- Apr 5, 2013
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,345
a) Provide a method signature for a method “findMatch” that receives an integer named
key. It then uses the value of key to access a HashTable and returns the macting
Object.
b) Provide a method signature for a method “getBest” that receives an array of doubles
(use theList forthe parameter name). The method should locate the highest number
in theList and return its value to the calling program.
c) Provide a method signature for a method “getBestGrade” that receives a Student
and returns their best grade (ie “HD”, “N”, …)
Question 2
Your boss has just emailed you some source code in a file CheckThis.java. You have
placed the file into a folder c:\temp on your computer and are currently at the command
line c:\temp>
a) What command would you enter to check if you have the correct version of javac and
the paths have been set correctly?
b) You compile the program, and the bytecode is created. What is the name of the file
that contains the bytecode?
c) Assume the file does NOT contain a main method. What would happen if you typed
java CheckThis at the command prompt?
key. It then uses the value of key to access a HashTable and returns the macting
Object.
b) Provide a method signature for a method “getBest” that receives an array of doubles
(use theList forthe parameter name). The method should locate the highest number
in theList and return its value to the calling program.
c) Provide a method signature for a method “getBestGrade” that receives a Student
and returns their best grade (ie “HD”, “N”, …)
Question 2
Your boss has just emailed you some source code in a file CheckThis.java. You have
placed the file into a folder c:\temp on your computer and are currently at the command
line c:\temp>
a) What command would you enter to check if you have the correct version of javac and
the paths have been set correctly?
b) You compile the program, and the bytecode is created. What is the name of the file
that contains the bytecode?
c) Assume the file does NOT contain a main method. What would happen if you typed
java CheckThis at the command prompt?