Commit 85aef6be authored by karl.templeton's avatar karl.templeton

14/03

parent 06c0f3c7
No preview for this file type
import java.util.Scanner;
public class App {
public static void main(String[] args) throws Exception {
System.out.println("Hello, World!");
System.out.println("Hello, World!");
System.out.println("Hello, World!");
System.out.println("Hello, World!");
//Intro to the code
System.out.println("Hello and welcome to my Zoo have a look around and enjoy your stay!");
System.out.println("Which animals would you like to see first?");
//Scanner will take the users input and store it so that the programming knows which animal to see
Scanner scanner = new Scanner(System.in);
String Species = scanner.next();
switch (Species)
{
case "Mammals":
if(Species.contains("mammals"))
{
System.out.println("You are at the mammals sections!");
}
}
scanner.close();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment