wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes What is this() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is this() method" Watch "What is this() method" New topic

What is this() method

jo sim
Ranch Hand

Joined: Apr 24, 2006
Posts: 37
Hi I want to know what is this() can someone just give me a small example of how it works or a site where i can read more about it. Please

Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

It is an explicit call to the no arguments constructor of an object. For example:

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
marc weber

Joined: Aug 31, 2004
Posts: 11343

See Calling constructors from constructors from Eckel's Thinking in Java.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sven studde
Ranch Hand

Joined: Sep 26, 2006
Posts: 148
It is sorta covered in the JavaRanch Style Guide.
subject: What is this() method
Similar Threads
are we missing something ? Our Boss Great Sir Paul Wheaton has crossed 4000!!! posts
how to return resultset from server to client in rmi
pass parameters from jsp to another jsp
what can i do with web.xml?
Can we change the name of class file which we get after running a jsp page