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

11th Jul 2017, 12:33 AM
Whitehat
Whitehat - avatar
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.
11th Jul 2017, 4:45 AM
Cailyn Baksh
+ 1
You would put the class move in the same package
11th Jul 2017, 4:55 AM
Cailyn Baksh
- 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?
11th Jul 2017, 4:49 AM
Whitehat
Whitehat - avatar
- 1
oh ok thanks
11th Jul 2017, 4:59 AM
Whitehat
Whitehat - avatar