ʹ Interface ͧ public abstrac ҹ
:: ¹ҡѹ :: Abstract Class Interface
หน้า 1 จาก 1
ʹ Interface ͧ public abstrac ҹ
package Interface;
interface IPERSON {
// public static final ҹ
public static int age =100;
// public abstract ҹ Default
String ShowName();
String ShowAge();
}
public class Personimplements IPERSON {
/// ѧࡵ ѹͧ public interface ѧѺ
public String ShowAge() {
System.out.println( " ShowAge() : "+(age)); // ++age ѹ Final
return null;
}
public String ShowName() {
// System.out.println("ShowName() : "+(++age)); // age ѹ Final
return null;
}
static public void main(String [] a) {
new Person().ShowAge();
new Person().ShowName();
}
}
interface IPERSON {
// public static final ҹ
public static int age =100;
// public abstract ҹ Default
String ShowName();
String ShowAge();
}
public class Person
/// ѧࡵ ѹͧ public interface ѧѺ
public String ShowAge() {
System.out.println( " ShowAge() : "+(age)); // ++age ѹ Final
return null;
}
public String ShowName() {
// System.out.println("ShowName() : "+(++age)); // age ѹ Final
return null;
}
static public void main(String [] a) {
new Person().ShowAge();
new Person().ShowName();
}
}
Re: ʹ Interface ͧ public abstrac ҹ
package Interface;
interface IPERSON {
// public static final ҹ
public static int age =100;
// public abstract ҹ Default
String ShowName();
String ShowAge();
}
public class Person implements IPERSON {
/// ѧࡵ ѹͧ public interface ѧѺ
public String ShowAge() {
System.out.println( " ShowAge() : "+(age)); // ++age ѹ Final
return null;
}
public String ShowName() {
// System.out.println("ShowName() : "+(++age)); // age ѹ Final
return null;
}
static public void main(String [] a) {
new Person().ShowAge();
new Person().ShowName();
}
}
Similar topics
» public static final ???????ö????˹?? Attibute ?ͧ interface ??
» How to use Comparable Interface
» How to use Comparable Interface
» ?????? Constructor ? Interface ??Ѻ
» When the first Whirlpool Duet album was released in December 2001 came as a surprise to the public
» How to use Comparable Interface
» How to use Comparable Interface
» ?????? Constructor ? Interface ??Ѻ
» When the first Whirlpool Duet album was released in December 2001 came as a surprise to the public
:: ¹ҡѹ :: Abstract Class Interface
หน้า 1 จาก 1
Permissions in this forum:
คุณไม่สามารถพิมพ์ตอบ