subject
Computers and Technology, 13.07.2021 16:30 abby986

//debugging exercises, Chapter 9;Java programming, Joyce Farrall, 8th edition import java. util. Scanner;
public class DebugNine4
{
enum Planet {MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE};
public static void main(String[] args)
{
Planet planet;
String userEntry
int position;
int comparison;
Scanner input = new Scanner(System. in);
System. out. print("Enter a planet in our solar system >> ");
userEntry = input. nextLine().toUpperCas();
planet = Planet. valueOf(userEnttry);
System. out. println("You entered " + planet);
pos = planet. ordinal();
System. out. println(planet + " is " + position + 1 + " planet(s) from the sun");
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Assume that you have an array of integers named a. which of these code segments print the same results? int i = 1; while(i < a.length) { system.out.println(a[i]); i++; } int i; for (i = 0; i < a.length; i++) { system.out.println(a[i]); } for (int i : a) { system.out.println(i); } i and ii only ii and iii only i and iii only all three print the same results. all three print different results.
Answers: 3
question
Computers and Technology, 21.06.2019 20:50
What are the advantages of google cloud ?
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 1
question
Computers and Technology, 25.06.2019 00:10
Select the correct answer sarah wants to use a device to input signatures on electronic documents. which input device will be most suitable for her? a digital pen b. laser pen c keyboard d. touchscreen reset next
Answers: 2
You know the right answer?
//debugging exercises, Chapter 9;Java programming, Joyce Farrall, 8th edition import java. util. Sc...
Questions
question
Mathematics, 26.02.2021 22:20
question
Mathematics, 26.02.2021 22:20
question
Mathematics, 26.02.2021 22:20
question
Mathematics, 26.02.2021 22:20
Questions on the website: 13722362