java - Using a class with int in main() -


i want write class 3 int values in them , manipulate them in main();

there 2 ways can think of doing

  1. have seperate .class file , include class file containint main() function

stuff.java:

class stuff { ... }  class app {  public static void main(string[] arguments) {    .. // manipulate instance variables      } } 

2 have class , class containint main function in same file app.java

app.java:

class stuff { ... }  class app {  public static void main(string[] arguments) {    .. // manipulate instance variables      } } 

are these main ways done in java ( didn't see on including java classes ). or can make stuff class contain main itself?

i wondering, if want write class 3 int values in them , manipulate them in main() method it! why need staff class ?


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -