Programming Tutorials

(追記) (追記ここまで)

How to define an Interface?

By: Karthik in Interview Tutorials on 2012年06月16日 [フレーム]

Answer: In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface.

Example of Interface:

public interface sampleInterface {
 public void functionOne();
 public long CONSTANT_ONE = 1000; 
} 



(追記) (追記ここまで)


Add Comment

JavaScript must be enabled for certain features to work
* Required information
1000

Comments

No comments yet. Be the first!
(追記) (追記ここまで)
(追記) (追記ここまで)

AltStyle によって変換されたページ (->オリジナル) /