Java - How could I improve this simple OOP application?
I'm just looking for some feedback. This is my first Java OOP application and I want to make sure I'm doing everything the right way. How could I improve this code?
Code:
//Brock Lynch July 31, 2012
//The beginning of the OOPTest class
public class OOPTest
{
// A static main method
public static void main(String[] args)
{
OOPTest t = new OOPTest();
t.Try("Brock");
}
// This is a method
public void Try(String aName)
{
while(i < 10)
{
System.out.println(i + " " + "Ha ha ha it worked" + " " + aName);
i++;
}
}
//Instance Fields
private int i = 0;
}
Re: Java - How could I improve this simple OOP application?
Indenting your code properly.
Using naming standards (only the method name is wrong here).
Other than that there's not enough of a program there to say.