Sunday, April 10, 2016

JAVA Access Modifiers


The following table shows the access to members permitted by each modifier from higher precedence to lower.

Access Levels
ModifierClassPackageSubclassWorld
publicYYYY
protectedYYYN
no modifierYYNN
privateYNNN


Let's look at a collection of classes and see how access levels affect visibility. The following figure shows the four classes in this example and how they are related
.
Classes and Packages of the Example Used to Illustrate Access Levels
Classes and Packages of the Example Used to Illustrate Access Levels

The following table shows where the members of the Alpha class are visible for each of the access modifiers that can be applied to them.
Visibility
ModifierAlphaBetaAlphasubGamma
publicYYYY
protectedYYYN
no modifierYYNN
privateYNNN

JBoss AS 6 Admin Console User / Password Creation

1. At first you go to 

http://localhost:8080  after that go to 


 Or directly

http://localhost:8080/admin-console



2. Now Open file:  [jboos_home]/server/default/conf/login-config.xml




3. Search in the file <application-policy name="jmx-console">  to find out the user configuration file. The following is the tag body:







4. Now open the  file: [jboos_home]/server/default/conf/props/jmx-console-users.properties  


5. And add 1 line after 1st line.
admin=admin1


6. Now Login with

username: admin 
password: admin1

And see the next screen: