So im getting the msg "Person cannot be resolved to a type" at Person p1,p2... and at P1,p2,p3 = new person...
Have been googling like crazy but im very new with programming and with Eclipse so im really lost at fixing this problem. I tried using this code with Sublime Text and i did actually get the same errors so is maybe the actual code the problem or is Eclipse bugging?
Thanks!
public class Ptest2main2{ public static void main(String[] arg) { Person p1, p2, p3; p1 = new Person ("Kalle anka", "123 ocean drive, orlando florida", 79); p2 = new Person ("Wile E Cotoye", "15 Acme Road, Hollywood California", 67); p3 = new Person ("Elmer Fudd", "Loony Toones Ave, bubank, California"); System.out.printf("\n%-18s%-40s%s\n", "namn", "adress", "alder"); System.out.printf (p1.skrivUt() + '\n'); System.out.printf (p2.skrivUt() + '\n'); System.out.printf (p3.skrivUt() + "\n\n"); } }
Personclass into yourPtest2main2class.Person? And is it in the same directory as yourPtest2main2class? It probably should be.