Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Learn Java ARRAY OF OBJECTS in 5 minutes! 🗃️
Play lesson

Java tutorial for beginners ☕ - Learn Java ARRAY OF OBJECTS in 5 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) { Car[] cars = {new Car("Mustang", "Red"), new Car("Corvette", "Blue"), new Car("Charger", "Yellow")}; for(Car car : cars){ car.color = "black"; } for(Car car : cars){ car.drive(); } } } public class Car { String model; String color; Car(String model, String color){ this.model = model; this.color = color; } void drive(){ System.out.println("You drive the " + this.color + " " + this.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