Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Learn Java Object Oriented Programming in 10 minutes! 🧱
Play lesson

Java tutorial for beginners ☕ - Learn Java Object Oriented Programming in 10 minutes! 🧱

5.0 (4)
40 learners

What you'll learn

This course includes

  • 12 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#java #javatutorial #javacourse public class Main { public static void main(String[] args) { // Object = An entity that holds data (attributes) // and can perform actions (methods) // It is a reference data type Car car = new Car(); System.out.println(car.make); System.out.println(car.model); System.out.println(car.year); System.out.println(car.price); System.out.println(car.isRunning); car.drive(); car.brake(); } } public class Car { String make = "Ford"; String model = "Mustang"; int year = 2025; double price = 58000.99; boolean isRunning = false; void start(){ isRunning = true; System.out.println("You start the engine"); } void stop(){ isRunning = false; System.out.println("You stop the engine"); } void drive(){ System.out.println("You drive the " + model); } void brake(){ System.out.println("You brake the " + model); } }

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere