• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stack Trace question  RSS feed

 
Morgan Roth
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the stack trace example:
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
> at javax.naming.InitialContext.init(InitialContext.java:217)
> at javax.naming.InitialContext.<init>(InitialContext.java:193)
> at test.client.TestClient.connect(TestClient.java:54)
> at test.client.TestClient.main(TestClient.java:71)
what is the meaning of <init> and why is it different from the init method in the previous line?
Thanks
 
Bill william
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
take a look at the source code
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<init> is the constructor or an instance initializer, while "init" is a method named init.
Similarly, <sinit> is a static initializator.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!