3

Where am i going wrong

view full story
linux-howto

http://www.daniweb.com – I am a uni student just starting out with java and getting more confused by the day. Can someone tell me what I have done wrong? It should input all of the strings and place them in the appropriate place in the bottom sentence. import java.util.Scanner; // Needed for the Scanner class /** * This program consist of just a single class. */ public class Words { public static void main(String[] args) { // Create a Scanner object to read input. Scanner keyboard = new Scanner(System.in); // output program's purpose System.out.println("This is the `Word Game'\n"); // Get the first name of your unit coordinator System.out.print("Please enter the first name of your unit coordinator: "); String coordinator; // name of the coordinator coordinator = keyboard.next(); // User to their first name System.out.print("Please enter your first name: "); String name; // your name coordinator = keyboard.next(); // Use to enter the name of a peice of food System.out.print("Please enter the name of a peice of food: "); String food; // the name of the food coordinator = keyboard.next(); // Use to enter a number between 37 and 42 System.out.print("Please enter a number between 37 and 42: "); String number; // your number coordinator = keyboard.next(); // Use to enter an adjective System.out.print("Enter an adjective: "); String adjective; // your adjective coordinator = keyboard.next(); //Use to enter a colour System.out.print("Please enter a colour: "); String colour; // your colour coordinator = keyboard.next(); //Use to enter the name an animal System.out.print("Please enter the name of a animal: "); String animal; // an animals name coordinator = keyboard.next(); //Display full paragraph with string data System.out.println (Dear " + coordinator, + " I am sorry that I am unable to turn in my assignment on time. First, I ate a rotten " + food + ", which made me turn " + colour + " and extremely ill. I came down with a fever of " + number + " degrees. Next," + my adjective + " pet " + animal + " must have smelled the remains of the " + food + " on my assignment, because he ate it. I am currently rewriting my assignment and hope you will accept it late. Sincerely, " + name + " "); } // end of main } // end of class Match (General)