Showing posts with label ToDo. Show all posts
Showing posts with label ToDo. Show all posts
Thursday, April 3, 2014
Anonymous Classes
"Anonymous Classes (The Java™ Tutorials > Learning the Java Language > Classes and Objects)" ( http://bit.ly/1hiO0OV )
Tuesday, November 26, 2013
Abstract classes and methods
"Abstract Methods and Classes (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)" ( http://bit.ly/1gcH6gn )
Tuesday, November 12, 2013
Wednesday, November 6, 2013
Reflection: Instantiation
Class<?> cl = Class.forName("javax.swing.JLabel");
Constructor<?> cons = cl.getConstructor(String.class);
Object o = cons.newInstance("JLabel");
Tuesday, July 30, 2013
Tuesday, May 28, 2013
JPanel
"How to Use Panels (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)" ( http://bit.ly/ZaWraM )
"JPanel (Java Platform SE 6)" ( http://bit.ly/Rn8WMx )
Monday, May 27, 2013
Wednesday, May 15, 2013
Object Reflection
"Retrieving Class Objects (The Java™ Tutorials > The Reflection API > Classes)" ( http://bit.ly/10WYmfe )
"Trail: The Reflection API (The Java™ Tutorials)" ( http://bit.ly/16dIKgn )
Wednesday, May 1, 2013
Thursday, April 18, 2013
Enum Types
Code Download :: EnumDemo.zip
"Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects)" ( http://bit.ly/15sJydz )
"Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects)" ( http://bit.ly/15sJydz )
Wednesday, April 10, 2013
NavigableMap Interface
......
Enhanced For Loop
Also called the For-each loop.
"Java: For-each Loop" ( http://bit.ly/HThpAk )
For each Line in the array called myLine.
Also see:
"Using Enhanced For-Loops with Your Classes" ( http://bit.ly/15bt7V5 )
Monday, March 4, 2013
Overriding Methods
Method overriding allows us to provide our own implementation of a method in a child class.
"Overriding and Hiding Methods (The Java™ Tutorials > Interfaces and Inheritance)" ( http://bit.ly/Zn8eop )
"Polymorphism (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)" ( http://bit.ly/PYQDIV )
"Overriding and Hiding Methods (The Java™ Tutorials > Interfaces and Inheritance)" ( http://bit.ly/Zn8eop )
"Polymorphism (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)" ( http://bit.ly/PYQDIV )
Monday, February 25, 2013
Unicode
"Unicode (The Java™ Tutorials > Internationalization > Working with Text)" ( http://bit.ly/13gWvIM )
"Unicode Chart" ( http://bit.ly/13gX0m1 )
"Unicode Chart" ( http://bit.ly/13gX0m1 )
Character wrapper class for char
"Characters (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)" ( http://bit.ly/LUgCyw )
Wednesday, February 20, 2013
A simple first example
HelloWorld.java
Download the following file and save it to a location on your machine. In this example, I will use the following directory:
HelloWorld.java
C:\SimpleJavaFiles
Note that the file HelloWorld.java has the .java file extension - this is a source code file. Open the file with Notepad (or another simple text editor).
It contains a class declaration which then opens a set of curly braces. All code for the class will be contained within these curly braces. The name of the class is HelloWorld. The class name and the file name must have the exact same spelling and case.
There is a single method inside of the class, called main. This is a special method in that it is where program execution begins.
public static void are reserved Java keywords.
The main method contains a single instruction/statement/line of code:
System.out.println("Hello World!");
This will cause the sentence Hello World! to be printed to the default console window.
Download the following file and save it to a location on your machine. In this example, I will use the following directory:
HelloWorld.java
C:\SimpleJavaFiles
Note that the file HelloWorld.java has the .java file extension - this is a source code file. Open the file with Notepad (or another simple text editor).
It contains a class declaration which then opens a set of curly braces. All code for the class will be contained within these curly braces. The name of the class is HelloWorld. The class name and the file name must have the exact same spelling and case.
There is a single method inside of the class, called main. This is a special method in that it is where program execution begins.
public static void are reserved Java keywords.
The main method contains a single instruction/statement/line of code:
System.out.println("Hello World!");
This will cause the sentence Hello World! to be printed to the default console window.
Monday, February 18, 2013
continue statement
From "Branching Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)" ( http://bit.ly/ZlvTp1 )
"The
continue statement skips the current iteration of a for, while , or do-while loop...."
Thursday, January 17, 2013
Sunday, August 19, 2012
Customising Eclipse - Content Assist feature
Content Assist is a feature in Eclipse that provides context sensitive information about what you are typing. It can be particularly helpful for reminding you of the name of fields and methods.
By default, Content Assist is set to trigger when you type the period (.) character. This is useful, however in this guide I will show you how to get it to trigger at the beginning of a statement as well.
To customise how Content Assist works in Eclipse:
Step 1
Locate Preferences
Step 3
Apply > OK
Try it
By default, Content Assist is set to trigger when you type the period (.) character. This is useful, however in this guide I will show you how to get it to trigger at the beginning of a statement as well.
To customise how Content Assist works in Eclipse:
Step 1
Locate Preferences
- Mac: Eclipse > Preferences
- PC: File > Preferences (from memory)
![]() |
| Locate the Preferences in Eclipse |
Step 2
Select Java > Content Assist
In the Auto Activation settings:
- set Auto activation delay to 0
- set Auto activation triggers for Java to a single space followed by a comma (,), followed by a period (.). (by clearing the textbox & typing)
![]() |
| Content Assist settings in Preferences |
![]() |
| Changing the Auto activation triggers for Java |
Step 3
Apply > OK
Try it
- type a single space in your code file to see that Content Assist pops up immediately
- type a character to see that Content Assist filters the list to names starting with that character
- use the arrow keys to move through the list and hit enter to insert the name
- place a period after the inserted name to see that Content Assist pops up immediately
![]() |
| Type a space at the beginning of a statement to activate Content Assist. |
![]() |
| Type a period after a name to activate Content Assist. |
Subscribe to:
Posts (Atom)





