Command Line Argument Processing in Java

A Java application can accept any number of command line argument. This allows the user to specify configuration information when the application is launched. When an application is launched, the runtime system passes the command line arguments to the application’s main method via an array of String s. Related Article: The Java Command – ‘java’ and ‘javaw’ Parameter Details … Read more

Java Commands & Options

The java commands supports a wide range of options: All options start with a single hyphen or minus-sign (-): the GNU/Linux convention of using — for “long” options is not supported. Options must appear before the or the -jar argument to be recognized. Any arguments after them will be treated as arguments to be passed … Read more

Programming to an interfaces in Java

The idea behind programming to an interface is to base the code primarily on interfaces and only use concrete classes at the time of instantiation. In this context, good code dealing with e.g. Java collections will look somethinglike this (not that the method itself is of any use at all, just illustration): public Set toSet(Collection … Read more

Maps in Java

The java.util.Map interface represents a mapping between keys and their values. A maps cannot contain duplicate keys; and each key can maps to at most one value. Since Maps is an interface, then you need to instantiate a concrete implementation of that interface in order to use it; there are several Maps implementations, and mostly … Read more

Immutable Empty Collections and iterators in Java with Examples

Sometimes it is appropriate to use an immutable empty collection. There are several ways to create immutable empty List in Java. The Immutable Empty Collections class provides methods to get such collections in an efficient way: List anEmptyList = Collections.emptyList(); Map anEmptyMap = Collections.emptyMap(); Set anEmptySet = Collections.emptySet(); These methods are generic and will automatically … Read more

Queues and Deques Interfaces in Java with Examples

Queues and Deques Interfaces in Java

The current Deques interface in java. Utility Package is a Queue interface subtype. The Deque is related to the double-ended queue that supports elements from either end of the data structure being added or removed. It can either be used as a queue(first-in-first-out/FIFO) or as a stack(last-in-first-out/LIFO). The usage of the PriorityQueue PriorityQueue is a … Read more

Primitive Data Types

Primitive Data Types in Java

The 8 primitive data types byte, short, int, long, char, boolean, float, and double are the types that store most raw numerical data in Java programs. The char primitive data types A char can store a single 16-bit Unicode character. A character literal is enclosed in single quotes char myChar = ‘u’;char myChar2 = ‘5’;char … Read more

Java Annotations Tutorial – Types of Java Annotations List For Beginners

Java Annotations Tutorial – Types of Java Annotations List For Beginners from Coding compiler. Here you will learn about Java annotations, types of annotations, annotation retention policy, annotation reflections, built-in annotations. Lean Now.!

Read more

Java Exceptions Tutorial – Exception Handling In Java With Examples

Java Exceptions Tutorial – Exception Handling In Java With Examples from Coding compiler. Here you will learn about exception statement, types of exceptions in Java, exception hierarchy in Java. Learn Now.!

Read more

Java Statements Tutorial – Java Control Flow Statements Tutorial For Beginners

Java Statements Tutorial – Java Control Flow Statements Tutorial For Beginners 2018 from Coding compiler. Here you will learn about Java if statement, for statement, while statement, break statement, continue statement and comment statement. Let’s start learning Java programming.

Read more

Java Operators Tutorial – Operators In Java Tutorial For Beginners

Java Operators Tutorial – Operators In Java Tutorial For Beginners from Coding compiler. Here you will learn about arithmetic, boolean, relational, ternary and bitwise operators. Let’s start learning Java now.!

Read more

Java Data Types Tutorial – Java Tutorial For Beginners

Java Data Types Tutorial – Java Tutorial For Beginners from Coding compiler. Here you will learn about boolean type, integer type, floating point type, character type. Let’s start learning Java now.!

Read more

Introduction to Java Programming – Java Tutorial For Beginners

Introduction to Java Programming – Java tutorial for beginners. Here Coding compiler sharing a beginners tutorial on Java programming. It will help you to know about the history of Java, characteristics of Java, Java features and benefits of Java programming. Let’s start learning Java programming.

Read more