0
Is it better to place connection method and arraylist object into one class or separate classes?
So i have a database of mysql with employee details. I need to create an arraylist of employees when my GUI application is running. Should i put connection method(read and write database), create arraylist object method and other methods into one class or 2 different classes? sorry question might be unclear, i myself not sure how to question it.
14 Respostas
+ 4
+ 2
I prefer to separate this
look at this tutorial https://dzone.com/articles/building-simple-data-access-layer-using-jdbc
0
Please mind the difference between Java and JavaScript, not only that but you have not mentioned anything related to both languages.
0
i dont think i write anything about javascript though?
0
One of your tags is Java
0
Also, programming as a tag is pretty stupid as this whole Q&A is about programming.
0
well the question is about java of course the tag is java...
of course its programming, this Q&A have questions about html. HTML is not a programming language
0
SoloLearn is a programming place, putting such tag is useless.
0
And it talks about SQL, I don't see any word about Java.
0
the question is about classes design of database mysql and the programming language which is java in this case. classes design mostly used in ood programming language only. Not all programming languages are ood, so i specifically put java tag
0
thanks for the reference asa22
0
Do you mean OOP?
0
oh yeah OOP
0
I still suggest removing the programming tag