Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
mohamed sanaullah wrote:This looks like some quiz for us
![]()
paul rappai wrote:When i read through one book(Head first Java).pop up some doubts in core java.
1)what is the difference between below statements?
a=b;
c=b.clone();
paul rappai wrote:
2)what is the difference between below statements?
Set s = new HashSet();
HashSet s = new HashSet();
paul rappai wrote:
9)if child object is serialzied then parent will be automatically serialized?
paul rappai wrote:
10)when to use inner class in our project?
paul rappai wrote:
11)Object Class is implemented Clonable interface, so child class will be use Clonable features. then why
we need Clonable interface as separate?
paul rappai wrote:
12)Will instance variables make any memory issue in Garbage collection?
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
mohamed sanaullah wrote:
paul rappai wrote:
2)what is the difference between below statements?
Set s = new HashSet();
HashSet s = new HashSet();
No difference- The first one is like- Coding to the Interface.
paul rappai wrote:9)if child object is serialzied then parent will be automatically serialized?
Yes, so the parent also should implement Serializable.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Prime wrote:
mohamed sanaullah wrote:
paul rappai wrote:
2)what is the difference between below statements?
Set s = new HashSet();
HashSet s = new HashSet();
No difference- The first one is like- Coding to the Interface.
There is absolutely a big difference. What happens if you don't want a HashSet anymore but prefer a TreeSet?
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Jesper de Jong wrote:Welcome to JavaRanch.
Wow, twenty-eight questions in one post!We normally encourage people to ask one question per post, because discussing many different questions at the same time can become very confusing. But I don't want to tell you to start 28 new topics right now...
Some of the questions you ask (for example about finally blocks, and why String is final) have been discussed here a number of times before. Try using the search functionality of the forum to find more information about those.
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|