Answer by SRy for Confusion about constructors
so your answer will be public SomeClass{ String str1; String str2; String str3;public SomeClass(String str1){ this.str1=str1; }; public SomeClass(String str1,String...
View ArticleAnswer by Richard Owczarzy for Confusion about constructors
I got similar questions in my previous Java course. You are writing constructor for SomeClass. You are supposed to overload the constructor, e.g. it can accept a different number of arguments...
View ArticleConfusion about constructors
Consider the following segment of code.SomeClass someObject1 = new SomeClass("Computer Science");SomeClass someObject2 = new SomeClass("Computer Science", "Rocks");SomeClass someObject3 = new...
View Article
More Pages to Explore .....