Skip to content

Instantly share code, notes, and snippets.

@omerhakanbilici
Created September 20, 2013 15:52
Show Gist options
  • Save omerhakanbilici/6639648 to your computer and use it in GitHub Desktop.
Save omerhakanbilici/6639648 to your computer and use it in GitHub Desktop.
8. soru Box sınıfı - Android 101 - Geleceği Yazanlar - Turkcell
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