answersLogoWhite

0

How do you make a java class?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

You write the source code, in a text editor, or better in a special IDE. The source code should have the extension ".java". You can have several classes in the same file. Then you compile the class to bytecode; this creates a file with extension ".class".

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a java class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Extension file for Java?

Java source files have the .java extension, compiled Java class files have the .class extension.


What is java file in java?

A java file contains the code you write. One java file contains one class so for example when I want to make a class called Person, the source code is saved in Person.java


How you make a project in java?

You create a text file with a .java extension. Then you put a proper class definition.


How can we make sure (pragmatically) that a class will have no further child classes. Which programming stmt will do this in Java and C?

How can we make sure (pragmatically) that a class will have no further child classes. Which programming stmt will do this in Java and C++?


The actions in a java class are called?

The actions in a java class are called methods.


Why you start java program by class?

without class non of the folder can run so the java program should start in class we can use the class without object in java


Can you make a class final in java?

yes of course... using the final keyword


When java uses compiler?

What i know is java we will use compiler when it want to get class file(file with .class extension) from java file(file with .java extension).


Why would you make a class final in java?

You would make a class Final in Java if you do not want anybody to inherit the features of your class. If you declare a class as Final, then no other class can extend this class. Example: public final class X { .... } public class Y extends X { .... } Here Y cannot extend X because X is final and this code would not work.


How do you call main class with in main class in java?

We can't call a class. We always call a method in java.


What class begins java class hierarchy?

Class


The top most class in java?

All classes in java must inherit from the Object class