• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic class loading and lazy loading

 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any difference between lazy loading and dynamic class loading ?
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Definitely. Lazy loading means that you postpone loading until you need it. Dynamic class loading means you don't know the name of the class until runtime. Lazy loading can apply to both dynamic and non-dynamic class loading. (In fact, the JVM uses lazy loading all the time, also for the classes from the core API.)
 
Moguluri Ravi Kiran
Ranch Hand
Posts: 63
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not know Dynamic & Lazy class loading.
Please explain me with Suitable example.

Kiran.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really mean, "What is the difference between lazy ***** and eager *****?"
 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too wanted an example of dynamic class loading and lazy class loading
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dynamic loading:

Lazy loading:
 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this mean that lazy loading applied only to static methods ?
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it applies to classes. The thing is that classes are usually loaded when they are needed, and they are only needed when a static method or field is accessed or an instance of the class is created.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic