BaşlayınÜcretsiz Başlayın

Defining a car class

You will work with classes a lot through this course, so learning how to create them is crucial. Start by creating a new Java class, Car, which we will add to as the course progresses.

NOTE: You will see a class Main with a main method in your exercise. Running your code requires this, so do not edit those files. Always write your code inside the Main class.

Bu egzersiz

Introduction to Object-Oriented Programming in Java

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a class called Car inside the Main class.
  • The Car class is empty now; we will add implementations later in the course.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

public class Main {  
  
	// Complete the definition for a new Car class
    ____ ____ {

    }
    
    public static void main(String[] args) {
       
    }
    
}
Kodu Düzenle ve Çalıştır