Coding examples of basic functions in Java.
Inside each folder, a simple Java code is provided at path: xxx/src/xxx/Xxx.java.
For example, file "./methods/src/methods/Methods.java" provides a simple example of how to use methods in class-oriented programming.
- Hello
- Create variable
- Convert data type
- Condition: if else
- Condition: while
- Array
- Hash Table
- Run TestHashTable.java and enjoy!
- Java.lang package
- Search
- The Binary Search
- Learn 'Class' with a ticket machine
- Learn to use Class and Methods.
- Learn field/member variable
- Learn local variable
- Learn constructor
- Learn reference variable 'this'
- Learn constructor overloading
- Learn Constructor Caller
-
Learn to use package with a clock
-
Learn Inheritance with a CD/DVD database
- Learn polymorphism
- Learn upcasting and downcasting
Recommended Java IDE: Eclipse
Reference: