All Questions
2 questions
0
votes
1
answer
5k
views
Object constructors with dynamic parameter lists
I had a quick question and I was hoping someone could help me figure this out. I'm new to Java and I'm trying to learn about classes and objects and I see you can call parameters in the constructor of ...
6
votes
3
answers
4k
views
Is it better to have constructors with or without parameters?
Is it better to have constructors with or without parameters and why?
public NewClass( String a, String b, int c) throws IOException
{
//something
}
OR
public NewClass()
{
//something
}