Question
Explain the public class modifier.

Answers

As you develop Java programs, there may be times when you create classes that you don't want the code outside of the class package (the class file) to access or even to have the knowledge of.
When you use the public keyword within a class declaration, you make that class visible (and accessible) everywhere. A non-public class, on the other hand, is visible only to the package within which it is defined. To control access to a class, do not include the public keyword within the class declaration. Java only lets you place one public class within a source-code file. For example, the following statement illustrates the use of the public keyword within a class:

public class ImEverywhereYouWantMeToBe
{
}   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Rank these in the order of importance: power, health, status, wealth.
  • Q On the birth anniversary of which legendary sports person of India is the Arjuna Award conferred every year on outstanding sports person by the President of India?
  • Q How do we merge an image from a file to the current image in gimp?
  • Q The ratio of flux density and capacity of magnetic field in a medium is represented by
  • Q Which of the following tasks is performed by the same person in a well-controlled information processing facility/computer center? A. Security administration and management B. Computer operations and system development C. System development and change management D. System development and systems maintenance
  • Q An IS auditor reviewing an outsourcing contract of IT facilities would expect it to define the: A. hardware configuration. B. access control software. C. ownership of intellectual property. D. application development methodology.
  • Q Describe the Buddy system of memory allocation.
  • Q Define Address Resolution Protocol
  • Q Atomic number of Potassium is ______ than that of Chlorine.
  • Q The first invasion upon India took place in 712 AD. Who was the invader?
  • Q What are LRO's( Linked Reporting Objects)?