answersLogoWhite

0

The keyword public is an access specifier. A variable or a method that is declared public is publicly accessible to any member of the project. Any class or method can freely access other public methods and variables of another class.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What was the name of the first version of Java?

Java 1.0a2 was the first public release.


What does the java program error expected public class MathPow.java mean?

The error "expected public class MathPow.java" typically indicates that the Java compiler is expecting a public class declaration in the file named MathPow.java. In Java, the filename must match the public class name defined within the file. If the class is not declared as public or if the filename does not correspond to the class name, the compiler will throw this error. To fix it, ensure that the class is declared as public and that the filename matches the class name exactly.


When was Java developed?

Java was developed in the early 1990's by James Gosling at Sun Microsystems. Java was introduced to the public in 1995.


What is subroutine in java?

Subroutine mean what (in java)?


Can a .java file contain more than one java classes?

Yes, it can. However, there can only be one public class per .java file, as public classes must have the same name as the source file.


What does Systemout mean in java?

System.out refers to the Java console.


What is psvm in java?

public static void main


What implicit modifiers interface methods have in java?

public


What is the ticker symbol for Java Company?

The Java Brewing Company is not a public company and, thus, does not have a ticker symbol for trading.


How do you create a bean in Java?

In eclipse java beans can be created by using getters and setters. Example: public class Login { public String lmail; public String getLmail() { return lmail; } public void setLmail(String lmail) { this.lmail = lmail; }


How a class in java declared default?

default it is public type


What do you mean by multithread program in java?

A Program in Java that spawns multiple threads is called a multithreaded program in Java.