If The A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed In Java Programming?

0 votes
If there are no access modifiers present in the class, then where can we actually access it?
Nov 28, 2018 in Java by Neha
• 6,280 points
62 views

1 answer to this question.

0 votes
  1. A class that is declared without any access modifiers is said to have package or friendly access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.

answered Nov 28, 2018 by Frankie
• 9,810 points

Related Questions In Java

0 votes
3 answers

Check if a String is numeric in Java

Java 8 Lambda Expression is used: String someString ...READ MORE

answered Sep 3, 2018 in Java by Daisy
• 8,080 points
1,010 views
0 votes
2 answers

What's the best way to check if a String represents an integer in Java?

You can also use regular expression. str.matches("-?\\d+"); It will ...READ MORE

answered Aug 9, 2018 in Java by Daisy
• 8,080 points
346 views
+2 votes
3 answers

Listing all the subclasses of a specific class in Java

Try with BurningWave core library. Here an ...READ MORE

answered Dec 29, 2019 in Java by anonymous
• 300 points

edited Jan 9 by anonymous 771 views
0 votes
1 answer

What is the simplest way to read JSON from a URL in java

Read json from url use url.openStream() and read contents ...READ MORE

answered Jun 13, 2018 in Java by samarth295
• 2,190 points
613 views
0 votes
2 answers

What is the use of final class in java?

In Java, items with the final modifier cannot be ...READ MORE

answered Oct 5, 2018 in Java by Daisy
• 8,080 points
62 views
0 votes
1 answer

Why Java String class is declared as final?

String class is made final in Java ...READ MORE

answered Aug 21, 2018 in Java by code.reaper12
• 3,470 points
94 views
0 votes
1 answer

What is blank final variable?

A final variable in Java can be ...READ MORE

answered Nov 29, 2018 in Java by Frankie
• 9,810 points
159 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,400 points

edited Nov 6, 2018 by Omkar 12,953 views
0 votes
1 answer

Which is the standard concise way to copy a file in Java?

As toolkit mentions above, Apache Commons IO ...READ MORE

answered Nov 15, 2018 in Java by Frankie
• 9,810 points
37 views
+1 vote
1 answer

What is a simple way to repeat a string in java?

From Java 11 on, there's a method String::repeat that does ...READ MORE

answered Aug 28, 2018 in Java by Frankie
• 9,810 points
2,150 views