superclass/subclass compatibility

They must really love this topic on the Java Certification exam, because they ask it in several different questions. Make sure you have it down before taking that test. Here are possible assignments and a note about their compatibility: superclass = subclass ==> always valid, subclass = (subclass) superclass ==> valid at compile time, checked at run-time,

“Is a” versus “Has a”

Don’t confuse inheritance with nesting (having a member that refers to another object). Declaring an object as a data field inside a class just sets up a reference variable to the object with no special privileges or relationship. In contrast, inheritance says the subclass is a variation of the superclass that extends its semantics in

JSF Message Resources

in src/main/resource create file called “” in which we will define our messages here footerText=This text is defined in the file Then add the below lines into your “faces-config.xml” file to identify the messages bundle into the application; <application> <resource-bundle> <base-name>MessageResources</base-name> <var>messages</var> </resource-bundle> </application> then in any of your .xhtml file you are good

Installing and configuring Glassfish 4.1 on RHEL and Centos

cd /opt wget unzip mv glassfish4 glassfish create glassfish user groupadd glassfish useradd -s /bin/bash -g glassfish glassfish chown -R glassfish: /opt/glassfish change the user password passwd glassfish nano /etc/init.d/glassfish add the below line #!/usr/bin/env bash # description: Glassfish start/stop/restart # processname: glassfish # chkconfig: 2445 20 80 JAVA_HOME=/usr/java/jdk1.7.0_75 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH GLASSFISH_HOME=/opt/glassfish