Java tutorials

Autoboxing in Java Autoboxing in Java means the ability to convert primitive types like int, float etc to primitive primitive wrapper classes such as Integer, Float etc. The below syntax helps to show, how to converts int into Integer class. There are multiple examples here which helps to learn about boxing and unboxing. The advantages and […]

Java Annotations Java annotations are the facility to add meta-data facility to the java elements. An annotation is a special form of syntactic metadata and it is helps to add to java source code classes, methods, variables, parameters and packages may be annotated. An annotation gives data about a program. It is not part of […]

Generic means parameterized types. The type upon which a generic method, class or interface operates is specified as a parameter. Generics in java permits in application to create classes and object that can operate on any defined types and it also provide a mechanism for annotating type information of generics. We can implement generics by […]

Java Enums An Enum type field includes the fixed set of constants. The values of enum type fields are in uppercase letters. In java, we are using enum keyword for define an enum type. Eg: – public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } Enum types can represent affixed set of […]

Java Aspects Class is the central unit in java like that aspect is the central unit in AspectJ. IT includes the code that defines the weaving rules for both dynamic and static crosscutting. Aspects also include data, methods, and nested class members. The below syntax defines the syntax for defining aspect. Syntax: – package hello.profile; […]

Java Technology Java technology is both a programming language and a platform. In the Java programming language, all source code is first written in plain text files ending with the .java extension. Those source files are then compiled into .class files by the javac compiler. A .class file does not contain code that is native […]

Java is always an interesting language to learn and work on as compared with nay other programming languages. The enablers to the mentioned are that java is fast and is very interactive language. By programming to the Java Platform, you can develop and deploy applications to desktops and servers, as well as to today’s demanding […]

Input and Output – Java tutorial Pages like these in the tutorial as well as your resume stored on your computer are called data files. The toolbars at the top of your computer screen are called program files. In Java, files like theses are part of the File class. These, however, cannot be opened, processed, […]

Introduction to Exception Handlers – Java tutorial An exception is an unexpected condition. To know how to create exceptions, you gotta learn to expect the unexpected. Most common errors are math error. Consider the program below:public class MathError {   public static void main(String[] args) throws ArithmeticException   {     int num = 13, denom = 0, result; […]

Abstract Class – Java Tutorial An abstract is a class that you cannot create any concrete objects, but you can extend from. You use the keyword abstract when you declare the class. You can also create methods that are abstracts that can be inherited. Below is an example of an abstract class. public abstract class […]