Created
September 20, 2013 15:52
-
-
Save omerhakanbilici/6639648 to your computer and use it in GitHub Desktop.
8. soru Box sınıfı - Android 101 - Geleceği Yazanlar - Turkcell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.omerhakanbilici; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: omerhakanbilici | |
* Date: 20.09.2013 | |
* Time: 17:51 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
//8. soru - Cevap: Çalışmaz | |
public static class Box { | |
private int a; | |
private int b; | |
public Box(int a, int b) { | |
this.a = a; | |
this.b = b; | |
System.out.println("a : " + a + " b : " + b); | |
} | |
public void area() { | |
System.out.println(a * b); | |
} | |
} | |
public static void main(String[] args) { | |
Box box = new Box(2,5); | |
box.area(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment