Search Java Tutorials

Custom Search

What You Will Want to Complete This Tutorial?

You must have at least 1st and 2nd pre-requirements to start the tute. Other requirements will require for last chapters only. These all are free to use and download!
  1. Java Development Kit Standard Edition (JDK / J2SE) Any Version(www.java.com)
  2. Any Text Editor (Note Pad quite enough or get Notepad++ from (http://notepad-plus.sourceforge.net)
  3. Java Run Time Environment (JRE) Any Version(www.java.com)
  4. Java Enterprise Edition (J2EE) for advanced developing (For last few chapters)(www.java.com)
  5. Java Wireless Toolkit for Mobile Application Development (For Mobile Application Development Chapters) (www.java.com)
  6. Tomcat Web Server to run Servlets. (www.tomcat.apache.org/)
Your operating system may be any version of Windows.
What will you learn (As a summary)?
  1. How to build console and windowed applications using Java
  2. How to build web page elements with Java Applets
  3. How to build Database Programs with Java
  4. How to build enterprise applications with Beans
  5. How to add Email functions to Java programs
  6. How to program smart devices (Phone, PDA etc…) with Java

What is “this” in Java?

As we stated earlier, you just store one copy of a class (including methods) for use with each object. You store separate fields (variables defined just after class declaration) for each object. The compiler access the correct object’s data fields because you implicitly pass a ‘this’ reference to class methods. In general sense, ‘this’ reference removes confusable states occurs with object declarations. If you have more than one objects based on the same class which has class data fields, then java use implicitly ‘this’ reference to keep in track of fields of each object.

You don’t want to worry about this “this” because java will implicitly do most of it. We will bother about “this” later where we want to explicitly define it.

Tip: he Java keywords this and super are closely related to the method invocation. The use of this and super keywords is twofold. They can be used:
As a reference to access the instance members or the superclass members (as we have seen earlier in section 1.4.2)
OR
As a method name for calling the constructors of the class or its superclass
The this keyword used within an instance method refers to the instance on which the method is called upon.

No comments: