I have a simple JAVA program that I have written in Eclipse and I am using as a building block for a larger program, for some reason, I am getting an error with the System.out.println.
Thanks in advance!
Error: The method println(String) in the type PrintStream is not applicable for the arguments (String, String, String)
Code:
package UserInfo;
import java.util.*;
import java.util.Scanner.*;
import java.awt.*;
import javax.swing.*;
import java.io.*;
public class UserInfo {
public UserInfo() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println ("This program will gather your personal information. \n\n");
Scanner userInput = new Scanner (System.in);
System.out.println ("Enter your first name: ");
String firstName = userInput.nextLine();
System.out.println ("Enter your last name: ");
String lastName = userInput.nextLine();
System.out.println ("Enter your street address: ");
String addressStreet = userInput.nextLine();
System.out.println ("Enter your city: ");
String addressCity = userInput.nextLine();
System.out.println ("Enter your two letter state abbreviation (ex:TN): ");
String addressState = userInput.nextLine();
System.out.println ("Enter your 5 digit zip code: ");
Integer addressZip = userInput.nextInt();
/*
System.out.printf ("Enter your phone number (ex: 1234567890): ");
Integer addressPhone = userInput.nextInt();
*/
String addressQualified = (addressStreet + "\n" + addressCity + "" + addressState + ", " + addressZip + "\n");
String nameQualified = firstName + "" + lastName + "\n";
System.out.println ("User: ", nameQualified, "\n"); **//Error here**
System.out.println ("Users Address: ", addressQualified, "\n"); **//Error here**
//System.out.printf ("User Phone: ", addressPhone, "\n");
}
}