Hello everyone.I am new here and am also new to the world of Java.I am a second year student(computer science) and recently was alloted a RDMS project.Thats why I started learning Java.
The project that I am going to submit is about creating an HR Management Systems.I am using Netbeans 6.5 and successfully connected to Oracle(10g Xpress edition) through the following code:
Now what I need is to create other classes within the same package "humanresourcemanagement" and which actually contains the GUI and other internal Query executing programs. My question is how to create that?
I have tried the following:
Source Package->new->Java Class->"Insertion file" //it gets added to the default package
humanresourcemanagement->new->Java Class->"Insertion file" //it gets added along with the Main.Java file and imports humanresourcemanagement
Again since I have the connection variable in the "Main.Java" file, so how will I be able to use it in my new "Insertion" class??
Do I need to add the entire connection code in all the new "Insertion","deletion" etc classes??......
To sum it up in a few words,i want the connection part to be kept separately in the Main.Java class, and all the other GUI and query execution programs on other separate files and have them linked somehow??
Please I am new to JAVA(with background in C)..so what I am wanting here may not be the correct way to do the things,if that is the case then please advise me with better options
Finally just to add,I am really into making this project and thus is undergoing the painful transition from C to JAVA(and I am really excited about it too) and so am really working hard. So any kind of help will be highly appreciable from this end. Thank you
I know that. Actually using the oblects of Statement class I can execute queries.But the problem I am facing is the code for executing those queries has to be included in my Main.Java program(source code above,).But I want to write separate programs for query execution and get them included in my package"hrmanagementsystems".How will I be able to that??
I want to keep the connector program(the sourcr code above,which is also the Main.Java class of my package) separate from the GUI programs that I will make for my database.But the GUI programs will need the connector variable that i have defined in "Main.Java"..how will I be able to use that??
I am very sorry for not being able to actually explain my problem here...in C I would have simply done this:
and then I could have used the connector vriable in my program here. But I dont know how to do it in Java.
author & internet detective