Skip to content

Instantly share code, notes, and snippets.

@raziyeaydin
Created December 3, 2013 11:56
Show Gist options
  • Save raziyeaydin/7767977 to your computer and use it in GitHub Desktop.
Save raziyeaydin/7767977 to your computer and use it in GitHub Desktop.
package kitap.bolum10.nyp;
import javax.swing.JOptionPane ;
public class Insan_JOptionPane {
static double boy ;
static String isim, cinsiyet, boyS, yasS ;
static int yas ;
static void bilgi (){
isim = JOptionPane.showInputDialog("isminizi girin: ");
boyS = JOptionPane.showInputDialog("boyunuzu giriniz: ");
boy = Double.parseDouble(boyS);
yasS = JOptionPane.showInputDialog("yaşınızı giriniz: ");
yas = Integer.parseInt(yasS);
cinsiyet = JOptionPane.showInputDialog("cinsiyetinizi girin");
}
public static void main(String[] args) {
Insan_JOptionPane kisi = new Insan_JOptionPane();
bilgi();
String mesaj = kisi.isim + "," + kisi.yas + " yaşında " + kisi.boy + " boyunda " + "cinsiyeti ise "+ kisi.cinsiyet ;
JOptionPane.showMessageDialog(null,mesaj,"SONUÇ",JOptionPane.INFORMATION_MESSAGE);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment