Dipl.-Inf. (FH) T. Mättig

22.03.2005

Java Resources

Abgelegt unter: — Thiemo Mättig @ 08:47

Java 1.4.2 API Specification online at Sun. JDOC2CHM, convert any JavaDoc to HTML help (CHM) or download the J2SE SDK 1.4.1 as HTML help (30 MB). Java ist (auch) eine Insel, complete German introduction to Java.

Additional Resources (German unfortunately): “Kurzeinführung in Java” (short but nice), “Anwendungsprogrammierung Java” (including a lot of examples and exercises), both at University of Chemnitz.

Here are the HelloWorld and BankAccount examples:

class HelloWorld
{
  public static void main(String args[])
  {
    // System.out.println("0: " + args[0]);

BankAccount account; account = new BankAccount(); account.addMoney(15.00);

double money; money = account.subMoney(20.00); System.out.println(money);

System.out.println(account.getBalance()); } }

class BankAccount
{
  private double balance = 0;

public void addMoney(double money) { balance += money; }

public double subMoney(double money) { // if (money > balance) return 0.00; if (money > balance) money = balance; balance -= money; return money; }

public double getBalance() { return balance; } }

Kommentare »

Der URI zum TrackBack dieses Beitrags lautet: http://blog.maettig.com/2005/03/22/java-resources/trackback/

Noch keine Beiträge.

Einen Kommentar abgeben

E-Mail-Adresse wird nicht angezeigt, HTML erlaubt: <a href=""> <blockquote> <code> <em> <li> <ol> <strong> <ul>


Powered by WordPress