Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 22nd, 2012  |  syntax: None  |  size: 0.35 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.io.*;
  2.  
  3. class test
  4. {
  5.         static String name = "tim";
  6.         static int geld = 10;
  7.        
  8.         static void setgeld(int geld)
  9.         {
  10.                 this.geld = geld;
  11.         }
  12.  
  13.         /*
  14.         static void setgeld(int g)
  15.         {
  16.                 geld = g;
  17.         }
  18.         */
  19.  
  20.         static int getgeld()
  21.         {
  22.                 return geld;
  23.         }
  24.        
  25.         public static void main(String args[])
  26.         {
  27.                 System.out.println(name+": "+geld);
  28.         }
  29. }