Quantcast
Channel: Java Programming Forum - Learn Java Programming - Hibernate
Viewing all articles
Browse latest Browse all 76

Basic Configuration question

$
0
0
factory = new Configuration().configure().buildSessionFactory();

In the above:
1. Configuration() is a class
2. configure() is a method in the Configuration class

What is buildSessionFactory()? How can the configure() method have another method buildSessionFactory() inside it?

I know it is possible to call a method inside another method, but how can a method have a definition of another method?

Viewing all articles
Browse latest Browse all 76

Trending Articles