answersLogoWhite

0


Best Answer

To name a class, you simply need an access specifier, sometimes the word "static" or "abstract" (only if applicable), the word "class", and a class name. The body of the class is then contained in brackets. Example:

public class Empty{}

"public" is the access specifier (public is also default, and thus really unnecessary), and "Empty" is the class name. It is common to capitalize the first letter of the class name, as well as the first letter of each word if the name is made of several words concatenated together.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the coding standards used in java to name a class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the sun coding standards for naming a class in java?

Some naming conventions/standards for Java classes are: a. A java file must be saved with the name of the public class in the file b. A Java file can have only one public class but can have any number of other classes c. The class names must be in Camel Case. Ex: AnExampleClassForWikiAnswers is how class names should be coded d. Even methods must be in camel case with one difference that the first alphabet must be in lower case. Ex: getSampleDataFrWiki()


Is there class name as object in java?

Yes, the base class for all other Java classes is Object.


What ananomus classes in java?

An Anonymous class in Java is one that does not have a name. It is usually created inside a class


Is it possible to have file name as java eg javajava?

Yes you can name a file (class if you use eclipse) java or even have java in the name.


How do you execute a Java program?

You can run a Java application from the command line using "java <name of the class>"


Telephone bill program written in java source codes?

I Want the Java Coding For Creating Phone Bill & Customer Name & Her Details, Plz Send The Coding For Creating Phone Bill, Thank You Regards Suresh


Why the name of a java file is same as the name of the public class?

It is not compulsory that the java file name and name of the public class should be same. if u will give java file name and public class name different then u have to compile and run the program with another names. for example: u have named class sample i.e. (public class sample) and main function is also defined in this class. and u have saved the file as abc.java then u will first comple the file as: javac abc.java now run the file (type java class name(in which main function is defined) i.e. java sample try it.


How do you run a java program form the command prompt?

The command is "java", followed by the class name. For example, if your compiled class is called myclass.class, you give the command: java myclass


The name of a Java program file must match the name of the class with the extension java A True B False?

True


Why you same name in class and file in java?

For run the program


What type of class name you put in java?

any type


Java program file must match the name of class with extension true or false?

The name of the .java file should exactly match with the name of the public class in the file. Ex: public class Test { ..... } this file should be saved as Test.java