This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Technical Interview Questions

 
John Ipe
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's a full list of what you can do with reflection from the reflection trail in the java tutorial:
With the reflection API you can:
-Determine the class of an object.
-Get information about a class's modifiers, fields, methods, constructors, and superclasses.
-Find out what constants and method declarations belong to an interface.
-Create an instance of a class whose name is not known until runtime.
-Get and set the value of an object's field, even if the field name is unknown to your program until runtime.
-Invoke a method on an object, even if the method is not known until runtime.
-Create a new array, whose size and component type are not known until runtime, and then modify the array's components.
 
Chris Harris
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last interview I went to asked me:

Question:
What is printed?
Chris
 
John Ipe
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
all would be true!
(if you first compiled it with t.s1, t.s2 etc)
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Ipe:
Hi Dale,

I guess it would be neat to hear what questions you were actually faced with in the interview in 2001 (and any interviews you took after)?!

Thanks!
John


To tell you the truth I wasn't tech'ed. And I'm still at the same company. Good company. (Can't release the name)
 
Tauri Valor
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey heres one more..

What is an inner class?

Cheers,
Su Yeu
[ January 18, 2006: Message edited by: Su Yeu ]
 
Tauri Valor
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I request the Bartenders, and Sheriffs to continue "Technical Interview Questions" as long as it goes. Why dont we start a seperate section for this?

Cheers,
Su Yeu.
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are your pants?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Su Yeu:
Well I request the Bartenders, and Sheriffs to continue "Technical Interview Questions" as long as it goes. Why dont we start a seperate section for this?


Actually, I am sorely tempted to close this thread every time someone posts to it and it rises back to the top. The whole notion of a list of "interview questions" is absolutely counter to what we want to do here at the Ranch. JavaRanch wants you to learn Java -- not memorize answers to interview questions so you can get a job you're not qualified for. You should get a job because you really know the material based on experience -- not because you crammed for an interview.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Ipe:
Reflection is used mostly in tool development, such as class browsers, debuggers etc. when you want to retrieve information about classes and objects at runtime.


It's much more widely used than that. Think frameworks and "services" like Hibernate, for example. Hibernate reads config files with lines like

<property name="name" column="USERNAME"/>

And either generates calls to getName/getName or direct access to the field name.
 
mis mary
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

This topic help me a lot in developing my project. I will contribute more when I finished it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic