shweta patiljadhav

Ranch Hand
+ Follow
since Jul 06, 2015
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
29
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shweta patiljadhav

I hav a doubt from

Mala Gupta's

book.

Suppose you have the following
definition of class Person:


what is the output of this code?




this is about referencing and output is John:Paul both times.

Please explain me how? it is been explained in book, I read it thrice, but bit worried that if this type of question comes in exam I will have to think a lot about such type of question ...if my concept is clear I will think else i won't.

Thanks,
Shweta
Hello,

In OCA Java SE7exam , questions from question paper are evenly distributed from all chapters? or some chapters have more weightage over others?

Thanks,
Shweta.
“How can you
declare a class Curtain in a package building so that it isn’t visible outside the
package building?”

and answer is because top level class can not be protected and private? being OCA candidate please explain me what is top-level class AND why it can't be protected if it can be default? I can understand it can't be private.

TIA
6 years ago
According to

Mala Gupta

book

if there are two packages, building and library,
book is base class in package library,



Protected members of class Book are not
accessible in derived class StoryBook, if
accessed using a new object of class Book
6 years ago

derived class can inherit and access protected members of its base class, regardless
of the package in which it’s defined. A derived class in a separate package
can’t access protected members of its base class using reference variables.

and protected members are not accessible to unrelated classes in different package.

Please explain me first line.
6 years ago
Hi,

According to

Mala Gupta

book,



will compile but



won't complie....
please explain why?
6 years ago
Hello,

Do I need to give OCA before giving OCP exam? Which books are recommended for OCP? how to prepare for OCP ?


Thanks.
Thank you Sergej,

okay, but how String version is more specific than object version here?

TIA
Hi,

I ran this program on Netbeans and output is , String version, I don't understand why it is not object version?
Hello, What would be the out put of this code? please explain.




TIA
Hi ,

thank you very much! please give me an example code of making ArrayList of Double.

TIA
Please give me an example of ArrayList of double and floats....I am able to create one with String and StringBuilder only....
TIA
Hi,

in this code,

what would be the output? if on StringBuilder methods are called from left to right here delete() is called first. and why it's output is not 12SUN4512S5?
Why it is appending out put of delete method twice?

output is 12S512S5 ?

TIA
Shweta
Hi Seregej,

I saw that OCP is not available for SE8 , and I don't have any study material for SE8, I liked Mala Gupta's book and it is available for SE7.....is there is huge difference between these 2? I have completed reading syllabus for SE7 now, will that help me if i want to prepare for SE8 now? I am thinking of taking one certification just to show that I know JAVA ...as I have changed country and my basic degree is not from this country where I live right now...and I am stay at home mum....

Please guide,
Thanks