can we declare private class in java file?

Answer Posted / eknath wagadre

private and static keyword in java we can't use those
keyword any of the outer block. we can use those keyword
only and only inside of the block.(Block i.e Class )

NOTE: Outer class can't be private but inner class can be
private(bcz of this is the part of the outer class and also
inner class can be static.)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reverse sort a list in java?

503


how to open and edit XML file in Weblogic???

1539


What is parseint?

523


What is jar?

627


I want to store more than 10 objects in a remote server? Which methodology will follow?

2626






How many bytes is a char in java?

522


How many types of equations are there?

534


What is difference between this and super keyword?

506


What are the escape sequences in java?

557


Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example

2125


How do you create a method in java?

533


What are heap memory and stack memory and what are memory tables.

505


How many types of exception can occur in a java program?

526


What is a heavyweight component?

537


How to create com object in Java?

642