Java OOP in 10 Minutes! 🧱
Quickly learn Java Object-Oriented Programming concepts in just 10 minutes with this tutorial. #java #javatutorial

Bro Code
53.1K views • Dec 5, 2024

About this video
#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);
}
}
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);
}
}
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
53.1K
Likes
1.4K
Duration
9:51
Published
Dec 5, 2024
User Reviews
4.7
(10) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends