What is the difference between a public and a non-public
class?

Answer Posted / ravikiran(aptech mumbai)

public class is the one whose memebers can get an access to
all the classes in the same package and out of the package

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cr keyboard?

759


What is object cloning in Java?

724


Will minecraft java be discontinued?

781


What are disadvantages of java?

609


Which package is always imported by default?

648






What is a numeric literal?

622


Why can we not override static method?

685


Why do we need singleton?

622


What is a byte string?

715


What do you mean by synchronized non access modifier?

644


What is an anonymous class in java?

649


What is static keyword in java?

649


How do I get the | symbol on my keyboard?

677


Describe 2 different ways to concatenate two strings.

766


public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }

1941