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, 22.06.2019 00:50
Is one of the most injurious events that can happen to a person in a crash.
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
You know the right answer?
//debugging exercises, Chapter 9;Java programming, Joyce Farrall, 8th edition import java. util. Sc...
Questions
question
Mathematics, 21.04.2021 02:50
question
Mathematics, 21.04.2021 02:50
question
History, 21.04.2021 02:50
question
Mathematics, 21.04.2021 02:50
Questions on the website: 13722363