Home >Java >javaTutorial >Why should we follow Java naming conventions?
Java Naming ConventionMake your program easier to understand by making it easier to read.
In Java, class names should usually be noun, in title form starting with a capital letter, with the first letter of each word capitalized. Interface names should usually be adjective, in title form starting with a capital letter, with the first letter of each word capitalized.
package com.tutorialspoint;
interface TutorialsPointInterface { // some statements }
class TutorialsPointClass { // some statements }
class TutorialsPointClass { void printMessage() { } }
class TutorialsPointClass { int rollNum; String firstName; String lastName; }
class TutorialsPointClass { public static final int MAX_score = 100; }
The above is the detailed content of Why should we follow Java naming conventions?. For more information, please follow other related articles on the PHP Chinese website!