0
Would any experienced java programmer tell me how to put code together.
Do i have to put brackets at the end of one class to start another class and please show example. thank you
4 Respostas
+ 1
In java, classes are usually places is separate .java files which are linked by being placed within the same package. The only exception is when you use inner classes
public class myClass {
//Some code
class myInnerClass {
//some code
}
}
Inner classes still require closing braces. Take the java tutorial to learn more.
+ 1
You would put the class move in the same package
- 1
thank you so much but does that mean for an object called stickman so i would put the method to make him move into another class in the same package or a different package and then add 2 packages together?
- 1
oh ok thanks