User Tools

Site Tools


java:classes:extends

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

java:classes:extends [2013/04/26 09:51]
88.75.157.182 created
java:classes:extends [2013/04/26 10:02] (current)
88.75.157.182
Line 3: Line 3:
  
 <code java> <code java>
-package meine.mydate;+package myclass.mydate;
  
 import java.util.Date; import java.util.Date;
Line 29: Line 29:
  
 </code> </code>
 +
 +
 +==== usage of the extended class ====
 +<code java>
 +
 +package xmascalc;
 +
 +
 +import myclasses.mydate.MyDate; // import the class MyDate
 +
 +
 +
 +
 +public class XmasCalc{
 +
 +    /**
 +     * @param args the command line arguments
 +     */
 +    public static void main(String[] args) {
 +        // TODO code application logic here
 +    
 +                
 +        MyDate my = new MyDate();
 +        int year = my.getFullYear();
 +        System.out.println(year);
 +
 +
 +        int month = my.getMonth();
 +        System.out.println(month);
 +
 +    }
 +}
 +
 +
 +</code>
 +
 +
 +=== output ===
 +    2013
 +    99
advertising
java/classes/extends.txt · Last modified: 2013/04/26 10:02 by 88.75.157.182

Impressum Datenschutz