Results 1 to 9 of 9
- 09-30-2008, 04:00 AM #1
Member
- Join Date
- Nov 2007
- Posts
- 50
- Rep Power
- 0
how to create an object at runtime
Hi All,
I have few questions in java.I read these questions in a site,mentioned for interview questions.But no answers are provided in that site. Any one please give me answers for these questions.
1. how to create an object at runtime?
2. what are disadvantages of multithreading programing ?
3. what is client side refresh,server side push ?
Any help is appreciated.
Thanks,
sireesha.
- 09-30-2008, 04:15 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
For the first question, you can use newInstance() to create object of a class at run-time.
For the second question, I don't see any disadvantages, multithreading use heavily in my application and it gives lots of advantages to me.
I'm not clear what's your third question.
- 09-30-2008, 06:25 PM #3
Senior Member
- Join Date
- Sep 2008
- Posts
- 135
- Rep Power
- 0
Er, all objects are created at runtime. The 'new' keyword also creates objects at runtime
- 09-30-2008, 07:17 PM #4
Do you not know the type of object you need until runtime?
- 10-01-2008, 04:21 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 10-01-2008, 06:31 AM #6
A quick google would answer most of your questions. While we love to help, you have to do a tiny bit of work first.
Multi-threading is how you improve responsiveness of GUI applications.
Multi-threading is how you use today's quad processors and tomorrows 16 and 32 processor chips.
The disadvantage is that doing it right is hard. Or perhaps this is good, since it will separate the real developers from the folks who read "21 days to be a Java Programmer" and claim that they are professional developers.
- 10-01-2008, 07:20 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 10-01-2008, 12:06 PM #8
Senior Member
- Join Date
- Sep 2008
- Posts
- 135
- Rep Power
- 0
- 10-01-2008, 12:52 PM #9
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Ya, seems my fault. Because I thought he's talking about that. Looking his some past replays, if he has no idea that objects are creating in runtime, I'm wired. He doesn't know about objects.
Similar Threads
-
Operator < cannot be applied to java.lang.Object, Object
By Albert in forum Advanced JavaReplies: 2Last Post: 11-26-2010, 02:12 AM -
Parsing a superclass object to subclass object dynamicly
By Andrefs in forum Advanced JavaReplies: 1Last Post: 07-22-2008, 04:27 PM -
How to create object dynamically with class name known in string format
By ranu_gokhe in forum Advanced JavaReplies: 1Last Post: 04-09-2008, 02:15 AM -
How to cast an Object into a specific type (Integer/String) at runtime
By mailtogagan@gmail.com in forum Advanced JavaReplies: 2Last Post: 12-03-2007, 01:04 PM -
Automation server can't create object
By katie in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 08-06-2007, 10:53 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks