Java – Page 2 – POFTUT

Regex (Regular Expression) OR Logic Alternation Tutorial with Examples

Regex (Regular Expression) OR Logic Alternation Tutorial with Examples

A regular expression is a formation in order to match different text or words or numbers according to the given regex pattern. OR is a logic term used to provide selection choice from multiple choices. In this tutorial, we will explain what is Regex OR logic and how can we implement Regex OR in different … Read more

What Is EOF (End Of File)? Examples with PHP, C++, C, Python, Java

What Is EOF (End Of File)? Examples with PHP, C++, C, Python, Java

Files contain different types of data like text, image, video, headers, graphics, etc. All these data are stored in different encoding and formatting techniques but every file has an end which is named End Of File which sets the last by of the given file. In this tutorial, we will learn the meaning of the … Read more

Ternary Operator In Java Tutorial with Examples

Ternary Operator In Java Tutorial with Examples

The ternary operator is a conditional operator that is used in Java programming language. It is expressed as ?: which is very strange for Java syntax. The ternary operator provides some shortcuts and elegant solutions for different conditional situations. What Is the Ternary Operator? The ternary operator provides a condensed form of the if-else statement. … Read more

Java ArrayList Get() Method Tutorial with Examples

Java ArrayList Get() Method Tutorial with Examples

Java programming language provides List and ArrayList classes and objects in order to store multiple items in a single variable or structure. These List and ArrayList objects provide the get() method which is simply used to get an item from the List or ArrayList. get() Method Syntax The get() method of the ArrayList or List … Read more

JavaDoc Command Tutorial For Java Documentation

JavaDoc Command Tutorial For Java Documentation

javadoc is a tool that is provided by the Java Development Kit (JDK) in order to create documents from the Java source code. The documentation is generally created in HTML format where the content is read from the source code file. Source code file generally has .java extension. Sample Java Code During learning the javadoc … Read more

Switch Case Statement In Java Tutorial with Examples

Switch Case Statement In Java Tutorial with Examples

Switch … Case statement is a popular selection statement used in Java programming. Switch-case simply set cases and related code block to be executed when given case match. Syntax The complete syntax of the switch case statement in Java is like below. switch(EXPRESSION){ case CASE1:     CASE1_CODE_BLOCK;       break;   case CASE2: … Read more

What Is Constant Variable In Programming?

What Is Constant Variable In Programming?

Variables are a very important part of programming. We define variables in order to store data in simple or complex forms. Constant is used to create a variable which value can not be changed. This may seem a bit strange but in some cases, it can be very helpful. Constant Variable In general constant variable … Read more

What Is Null Pointer Exception In Java and How To Fix?

What Is Null Pointer Exception In Java and How To Fix?

Java programming language provides the Null Pointer Exception type in order to handle object creation related errors and misuse. In this tutorial, we will learn what is Null Pointer Exception, its causes and How To Fix it? Null Pointer Exception Java is an object-oriented programming language. Java provides different objects in order to create and … Read more

Java String compareTo() Function Tutorial with Examples

Java String compareTo() Function Tutorial with Examples

Java programming language provides the compareTo() function which is used to compare two strings. The comparison is done letter by letter and according to the situation, some results are returned by the compareTo()function. The comparison is done with the Unicode character set. compareTo() Syntax First, we will learn the syntax of the compareTo() function as … Read more

How To Print/Get Today Date and Time In JavaScript, C/C++, Python, C#, Java, PHP, PowerShell, Excel (VBScript) ?

How To Print/Get Today Date and Time In JavaScript, C/C++, Python, C#, Java, PHP, PowerShell, Excel (VBScript) ?

While developing applications date and time operations are very important. A lot of different data and record is bind to a date or time. We can also use the only date which specifies the year, month and day or time which specifies the hour, minute, second. All popular programming languages provides date and time functions … Read more