Forum Stats

  • 3,853,815 Users
  • 2,264,280 Discussions
  • 7,905,457 Comments

Discussions

Class Not Found Problem.

944196
944196 Member Posts: 2
edited Feb 9, 2015 4:09AM in New To Java

I cannotr seem to be able to run successfully this JAVA file. it keeps on telling me that the Class is not found or not available!! I using the Eclipse Luna Integrated Development Editor. My program uses a series of setters/getters but what could be wrong with it?

public class SomeJava1 {

static String name = "Steve Burrus";

static int weight = 226;

static double height = 5.8;

public void setName1(String name){

SomeJava1.name = name;

}

public String getName1(){

return name;

}

public void setWeight(int weight){

SomeJava1.weight= weight;

}

public int getWeight(){

return weight;

}

public void setHeight(double height){

SomeJava1.height = height;

}

public double getHeight(){

return height;

}

public static void main(String[] args) {

System.out.println("Hi I am " + name + "\n And I am " + height + "feet tall. \n And I weight some " + weight + "pounds. Too fat!" );

}

}

Answers

This discussion has been closed.