Java references key things explain java interview question interviewdot

Опубликовано: 20 Сентябрь 2013
на канале: Interview DOT
692
2

Click here -    / @interviewdot   to get notifications. Java references key things explain java interview question interviewdot
What are the key things to remember about java references ?

A reference variable can be of only one type, and once declared, that type
can never be changed.

Employe emp = new Employee();

A reference is a variable, so it can be reassigned to other objects, (unless the
reference is declared final).
Employe emp = new Employee();
emp = new Employee();


A reference variable's type determines the methods that can be invoked on
the object the variable is referencing.
CreditAccount creAct = new CreditAccount();
creAct.credit(fromAcc, toAcc);
A reference variable can refer to any object of the same type as the declared
reference, or—this is the big one—it can refer to any subtype of the
declared type.

Account  SavingsAccount
 CurrentAccount
TradeAccount

Account acc = new CurrentAccount();

A reference variable can be declared as a class type or an interface type. If
the variable is declared as an interface type, it can reference any object of any
class that implements the interface.
A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-re...

Other Top Job Portals
www.Naukri.com
www.MonsterIndia.com
www.TimesJobs.com

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-re...


На этой странице сайта вы можете посмотреть видео онлайн Java references key things explain java interview question interviewdot длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Interview DOT 20 Сентябрь 2013, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 692 раз и оно понравилось 2 зрителям. Приятного просмотра!