Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import java.util.*;
  3.  
  4. public class Unit4ReviewQuestion8 {
  5.  
  6.     private static Scanner text;
  7.    
  8.     public static void main(String[] args) {
  9.         // TODO Auto-generated method stub
  10.        
  11.         System.out.println("What would you like to talk about?");
  12.        
  13.         text = new Scanner(System.in);
  14.         String path = text.next();
  15.    
  16.         String Rabbit = "rabbit";
  17.        
  18.         if (path.equals(Rabbit)) {
  19.             System.out.println("It seems you would like to talk about rabbits");
  20.         } else {
  21.             System.out.println("Why don't we talk about rabbits instead");
  22.         }
  23.  
  24.        
  25.        
  26.     }
  27.    
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement