Skip to content

dxc33linger/Taste_Java

Repository files navigation

Have a cup of Java!

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.



  • Graph
    • DFS

  • Search
    • The Binary Search

  • Sort

    • The Selection Sort
    • How to Use 'Debug' mode in Eclipse

  • Learn 'Class' with a ticket machine

TicketMachine

TicketMachine2


  • Learn to use package with a clock

    • Use object as member variable
    • Import packages
    • System.out.printf (also see ref1, ref2)
    • toString()

  • Learn Inheritance with a CD/DVD database

    • Learn polymorphism
    • Learn upcasting and downcasting

Recommended Java IDE: Eclipse


Reference:

  1. https://study.163.com/course/courseMain.htm?courseId=533006
  2. https://study.163.com/course/courseMain.htm?courseId=1006190095
  3. The image of ticket machine is from https://www.artstation.com/artwork/6lK86.
  4. https://beginnersbook.com/2013/05/constructor-overloading/
  5. https://www.geeksforgeeks.org