Question: This a homework problem for JAVA I'm having trouble figuring out. Write a static method named BoldName , returns String, it should use a GLOBAL
This a homework problem for JAVA I'm having trouble figuring out.
- Write a static method named BoldName, returns String, it should use a GLOBAL variable as input:
- Build a string by placing the global variable full_NAME in between "Player " and " is in 1st place"
- Here is an example of what this string will contain: Player Some_Name is in 1st place
- Use the return statement to send the output string back to the caller (exact spacing required)
- Do not call BoldName, or initialize full_NAME, it will be done for you.
- Do not declare a variable! Varaibles named temp or data are provided (but not required)
- Hint: use the '+' operator to create the string
My attempt was
public static string BoldName ( ) {
System.out.println("Player " + full_Name + " is in 1st place.");
return BoldName;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
