Nesne Tabanlı Programlama-1 (Güz-2017) Hafta-6
1 2 3 4 5 6 7 8 9 10 11 12 |
package iste.main; // kendi yerim import iste.abc.x; // sinifin yeri //import iste.abc.*; public class calistir { public static void main(String[] asa) { System.out.println("Ben Calistir!"); new x(); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
package iste.abc; import iste.xyz.x.d; // sinif //import iste.xyz.x.*; public class x{ public x() { System.out.println("Ben X!"); new d(); } } |
1 2 3 4 5 6 7 8 9 10 11 12 |
package iste.xyz.x; import iste.abc.a.*; // sinif public class d{ public d() { System.out.println("BEN D!"); new b(); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
package iste.abc.a; // klasor import iste.xyz.*; // sinif //import iste.xyz.y; public class b{ public b() { System.out.println("Ben B!"); //new iste.xyz.y(); new y(); } } |
1 2 3 4 5 6 7 8 |
package iste.xyz; public class y{ public y() { System.out.println("BEN Y!"); } } |