Lesson: Class and Object
Bir paketin icinde eyni adli cemi 1 eded class duzelde bilerik. package org.example ; public class Car { public String model ; public String color ; public int year ; public static String manufacturer ; public static void staticMethod () { System . out .println( "This is static method" ) ; } public void nonStaticMethod () { System . out .println( "This is non static method" ) ; manufacturer = "Mercedes" ; } } Car . manufacturer = "General Motors" ; System . out .println( Car . manufacturer ) ; Car car = new Car() ; car .nonStaticMethod() ; System . out .println( car . manufacturer ) ; - Weird behaviour Car c = null ; c . manufacturer = "Cadillac" ; // c.model = "Island"; System . out .println( c . manufacturer ) ; // System.out.println(c.model); - Referansin qirilmasi Car one = new Car() ; one . model = "Toyota" ; one = new Car() ; o...