File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java interview question

 
Aruna Doddaka
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the various ways of declaring final variables
 
Corey McGlone
Ranch Hand
Posts: 3271
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As this doesn't appear to be an SCJP exam related question, I'm going to move this to Java in General (Intermediate).
Corey
 
KR Campbell
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm.. job interview question? I'm probably stepping outside my weight here but at first glance it seems like one of those make the candidate think questions. If it was me, I'd try to show them that I was thinking the answer through step by step because I'm not sure exactly what they want.
1. Describe what a final variable is.
2. how it applies to a primitive.
3. how it applies to an object.
4. class or instance.
5. access modifiers.
6. implicit in an interface ( or is that abstract classes ? ). :roll:
Maybe someone smarter has a better answer.
Regards,
Kenny
 
Chengwei Lee
Ranch Hand
Posts: 884
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd not start by telling the interviewer every single thing that I know of final variables. I'd take a few seconds to think about the question and seek clarification on what exactly does he wants, is it a simple

or is he looking for other things.
Not thought I don't know more about final variables, I'm merely showing to the interviewer that as an employee, I'd not hesitate to clarify my doubts & this translates to the fact that I'd make sure that I know as clear as possible what is expected of me prior to executing a task. Likewise, I'd make sure I understand clearly my client's requirements before putting it down into the specs.
Just my views.
 
Udegbunam Morah
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cheng Wei Lee ,
I totally agree with you. That approach will definitely win a knowledgeable employer.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
Originally posted by Udegbunam Morah:
Hi Cheng Wei Lee ,
I totally agree with you. That approach will definitely win a knowledgeable employer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic