0

a big help needed

actually i just came to know that i can not code for java. i get the logic bit really cant make it simple where to write the main class and from where to get objects. it is really getting messy. in net beans it seems very hard to understand the things. in case i am creating a project but why it is creating a same name class and what is the relation with this. please someone help me by explaining java coding structure simple way.

7th Dec 2016, 5:08 PM
Impeccable Hasib
Impeccable Hasib - avatar
2 odpowiedzi
+ 2
It can be a bit confusing at first, don't worry. Class must be in another files, (It's the best to have another package with the Java Classes). You can have 1 public class for each file. Main is where you can "test" and "call" your classes, creating a new objects, and your programm, wich is aid with your classes. Don't forget that you need to import the package/class where your Java Class are. Netbeans do it almost by itself tho.
7th Dec 2016, 5:55 PM
Nahuel
Nahuel - avatar
0
ao is there any problem if i create any class before the main package class?
7th Dec 2016, 6:06 PM
Impeccable Hasib
Impeccable Hasib - avatar