- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do I write interface names in Java?
While writing an interface/class names you need to keep the following points in mind.
- First letter of the interface/class name should be capital and remaining letters should be small (mixed case).
interface Sample
- Likewise, first letter of each word in the name should be capital an remaining letters should be small.
interface MYInterface
- Keeping interface names simple and descriptive is suggestable.
- Better not to use acronyms while writing interface/class names.
Example
interface MyInterface { void sample(); void demo(); } public class Test implements MyInterface { public void sample() { System.out.println("This is sample method"); } public void demo() { System.out.println("This is demo method"); } public static void main(String args[]) { Test obj = new Test(); obj.sample(); obj.demo(); } }
Output
This is sample method This is demo method
- Related Articles
- How do I write class names in Java?
- How do I write method names in Java?
- How do I write variable names in Java?
- How do I write constructor names in Java?
- How do I write package names in Java?
- How do I write constants names in Java?
- How do I create a user interface through Python?
- How do I write JSON in Python?
- How to write a class inside an interface in Java?
- How do I search for names starting with A in MySQL?
- How to write/declare an interface inside a class in Java?
- How do I create dynamic variable names inside a JavaScript loop?
- How do I compare strings in Java?
- Can we write an interface without any methods in java?
- How do I read (or write) binary data in Python?

Advertisements