In this demo we have one class called "ExtendedClassDemo" that calls a method from the class "ExtendedClassDemo"
Example:
GeSHi (java):
/*--------------------------------------------------------------------------
// Author List:
// deAppel <Creator>
//
// Description:
// Using a method in another class. Part 1/2
//
// Environment:
// This software was developed using Eclipse and Java 1.6
//
// Copyright Information:
// Copyright (C) 2007 <Institution><None>
// Ark de Appel www.engineeringserver.com
//
//----------------------------------------------------------------------*/
public class ExtendedClass extends ExtendedClassDemo{
public static void main
(String[] args
){ ExtendedClass EC = new ExtendedClass();
EC.classB();
}
}
Created by GeSHI 1.0.7.20
GeSHi (java):
/*--------------------------------------------------------------------------
// Author List:
// deAppel <Creator>
//
// Description:
// Using a method in another class. Part 2/2
//
// Environment:
// This software was developed using Eclipse and Java 1.6
//
// Copyright Information:
// Copyright (C) 2007 <Institution><None>
// Ark de Appel www.engineeringserver.com
//
//----------------------------------------------------------------------*/
public class ExtendedClassDemo {
public void classB(){
System.
out.
println("You are calling ExtendedClassDemo");
}
}
Created by GeSHI 1.0.7.20