This tutorials explains the various access modifiers used in Java language and the scope for the each modifier. There is four types of access modifiers in Java. private default protected public Private Modifier If you declare anything private inside a class, then it must be accessed inside that class. Other classes can not access that …
Java Keywords
Java has more than 50 keywords for the different operations. Here is the list of all the keywords and its purpose. Keyword Description abstract Abstract keyword can be use with classes and methods to defer the actual implementation to the child classes. assert This keyword used for testing the truth of a condition. boolean Indicates …
Static Keyword
Static keyword in Java used for indicating the members are belong to the class and not to the instance. It means that, if you declare a static members, it is shared among all the instances of that class. Also note that the static members are initialized before the instance creation of that class. Static keyword …
OCPJP 6 Mock Exam – 9
1 . What is the result when you compile and run the following code? Choose the one below: Compile Time error Runtime error Prints Testing myTop method in Top class on the console Prints Testing myTop method in Down class on the screen 2 . Which of the code fragments will throw an “ArrayOutOfBoundsException” ? …
JSP Directives
Java EE Tutorials JSP Tutorials Recommended Books for Java Server Pages (JSP) Directives specifies translation time instruction to JSP engine. There are three types of directives: page directive include directive taglib directive JSP Page Directive This directive can be used to specify any of a number of page-dependent attributes such as scripting language to use, …
NetBeans IDE 8.0 Beta Released
NetBeans is one of the leading IDE for the programming languages. This tool can be used as a platform to develop any complex applications using Java languages. This week they have announced the release of NetBeans 8.0 Beta which is mainly focusing on the support for Java 8 language. They are supporting the out of …
Final Keyword
Final keyword in Java language is used with variables, methods and classes. The general idea behind the use of final is to restrict the manipulation of original value. Variables – The initial value can not be changed once it is assigned. You can initialize the final variable first time, but later it is not allowed …
Abstract Keyword
Abstract keyword is used with class and method declaration. Abstract defines incomplete data structures where the final or complete implementation will be done by its child class. In Java, Abstract used for defining the common behaviour for a class and let the child class to override the common behaviour. Some of the characteristics of the …