Category

Programming Tutorials and Coding Guides

Explore programming tutorials with practical examples across multiple languages, scripting, and development concepts for beginners and advanced users.

Welcome to the Programming tutorials section, where you will learn coding concepts with real-world examples across multiple languages and platforms.

This category includes beginner to advanced guides covering scripting, automation, and application development in Java, JavaScript, Python, Go, TypeScript, and related stacks.

Whether you are learning programming for system administration or building applications, browse the articles below for practical examples and language-specific references.

Programming plays a crucial role in modern infrastructure and DevOps workflows. You can also explore DevOps and Linux to see how code integrates with system-level operations.

956 articles

Programming category illustration with code editor, automation, and debugging graphics
programming

How to get sublist from a list in Java

In order to get sublist either in an ArrayList or LinkedList, we have to use the sublist() method which is a method of AbstractList class.

Deepak Prasad7 min read
programming

How to split String into Array

In this tutorial we will cover multiple examples to understand how to split string into array for different scenarios

Deepak Prasad6 min read
programming

How to return an Array in Java [Practical Examples]

There are three different ways to return an array from a function in Java as listed below: Return an array of primitive type, Return an array of objects, Return a multidimensional array

Deepak Prasad7 min read
programming

How to convert Set to list in Java [Practical Examples]

There are several ways to convert the set to list in java as listed below. Using looping, ArrayList Constructor, LinkedList Constructor, List.addAll() Method, List.copyOf() method, stream API, Apache Commons Collections

Deepak Prasad7 min read
programming

How to convert String to Date in Java [Practical Examples]

There are five ways to convert a String to Date in java as listed below. Using SimpleDateFormat Class, LocalDate Class, DateTimeFormater Class, Instant Class, Apache Commons Lang - DateUtils

Deepak Prasad6 min read
programming

How to Compare Characters in Java

There are several ways to compare characters in java as listed below, Using Relational Operators, Using Character.compare(), Using Character.hashCode(), Using compareTo() method, Using equals() method, Using charValue() …

Deepak Prasad6 min read
programming

How to initialize List in Java

Following methods can be used in Java to initialize list. The list interface can be initialized through 4 list classes: ArrayList, LinkedList, Stack, Vector

Azka Iftikhar7 min read
programming

6 ways to implement Hashing in Java

In this tutorial we cover following 6 different methods to implement hashing in java. Using Hashtable Class, HashMap Class, LinkedHashMap Class, ConcurrentHashMap Class, HashSet Class and LinkedHashSet Class

Deepak Prasad8 min read
programming

How to Copy a File in Java [Practical Examples]

The list below shows five different ways in which we can copy a file in Java. Using FileInputStream and FileOutputStream Using Paths and Files Using RandomAccessFile Class Using FileChannel Using Files.copy()

Deepak Prasad6 min read
programming

How to check if file exists in Java [Practical Examples]

In Java, there are three different ways to check if file exists or not such as Using exists method of Legacy I/O File class, Using isFile method of File class, Using exists method of NIO File class

Deepak Prasad6 min read
programming

How to get Current Date in Java

The list below shows eight different ways to get current date in Java Using java.util.Date, java.util.Calendar, java.time.LocalDateTime, java.time.LocalDate, java.time.Year, java.time.MonthDay, java.time.OffsetDateTime, …

Deepak Prasad6 min read
programming

How to reverse a list in Java [4 Different Methods]

We can reverse a list in Java using four different ways i.e. Using add and remove method, Using recursion, Using reverse method of Collections, Using ListIterator Interface

Deepak Prasad6 min read
programming

Return Multiple Values in Java [5 Different Methods]

We can use any of the five shown approaches as per the program requirement to return multiple values in Java. Return an array of specific type or object, Return using the Pair class of util package, Return a String …

Deepak Prasad7 min read
programming

Java string length Examples [Multiple Scenarios]

Multiple examples to use the java string length method to get length of java string.

Bashir Alam8 min read
programming

SOLVED: Check if path is subdirectory of another in Node.JS

In this tutorial we learned how to check if path is subdirectory of another directory using Node.JS. Tutorial on NodeJS Path module.

Deepak Prasad6 min read
programming

4 programs that shows how Java global variables work

A Java global variable is a variable that is declared outside a method or at the start of a code is a global variable, there are no access restrictions on a global variable. A Java global variable is mostly declared in …

Azka Iftikhar6 min read
programming

Node.Js forEach() statement Explained [Practical Examples]

In this article, you learned how you can use the Node.Js forEach() to iterate over an iterable in JavaScript. When iterating over array elements, you should opt for forEach() whereas using map() and reduce() would work …

Deepak Prasad6 min read
programming

3 ways to convert CHAR to INT in Java

There are 3 methods to convert char to int in java i.e ASCII values, getNumericalValue, ParseInt using ValueOf method.

Azka Iftikhar8 min read
programming

3 different ways to detect a loop in a Linked List

There are three ways to detect a loop in a linked list cycle. They are as listed below. Traversing through the list, Using HashSet, Using Floyd's Cycle Detection Algorithm

Deepak Prasad6 min read
programming

Java Predicate Explained

Java predicate function is a pre-defined user interface. Predicate is a function that returns a boolean value. And the function test(T t) evaluates the predicate for the argument given.

Azka Iftikhar7 min read
programming

How to set up Java with Visual Studio Code

Step by Step instructions to set up Java with Visual Studio Code. Create and compile your first Java Program using VSC.

Deepak Prasad4 min read
programming

How to set up Java with Eclipse IDE [Step-by-Step]

Step by step instructions to set up Java with Eclipse IDE. create your first Java program using Eclipse and execute the same.

Deepak Prasad4 min read
programming

8 different ways to use assert in Node.js [Practical Examples]

The purpose of the assert module in Node.js is to provide various ways of asserting functions. For instance, if the assertion. It is used to test the functionality of functions in Node.js.

Deepak Prasad6 min read
programming

Java ListIterator Explained

In this article, we will discuss how we can traverse forward through a list and traverse backward through a list using java ListIterator. This iterator is one of the most powerful cursors in java, it is a bidirectional …

Azka Iftikhar7 min read
programming

4 different ways to read JSON file in NodeJS

In this tutorial we will cover following methods to read JSOn file in NodeJS; Using fs module, require function and third party NPM libraries such as jsonfile and bfj

Deepak Prasad6 min read
programming

Java Arrays.asList Explained

The java Arrays.asList function returns a fixed-size list that contains a java Array. It acts like a list wrapped around an array, it provides a list view to an array.

Azka Iftikhar7 min read
programming

Accessor and Mutator Methods in Java

The knowledge of Java Accessor and Mutator is very useful as it implements encapsulation, which is one of the important feature of Object oriented Programming.

Deepak Prasad7 min read
programming

Java XOR (^) Operator Explained

In this article we will discuss the Java xor (^) operator, this logical operator is used in many conditional statements, it is also used as a bitwise operator to perform tasks with efficient logic

Azka Iftikhar7 min read
programming

How to Parse CSV Data in NodeJS

In this article, you learned how to parse CSV data in three ways. The first method reads the whole string then splits it into rows and columns.The second method solves this issue by reading the CSV line by line. The last …

Deepak Prasad6 min read
programming

Unary Operators in Java Explained

SUpported Unary operators in java are Unary Plus Operator(+), Unary Minus Operator(-), Logical NOT Operator (!), Increment Operator (++), Decrement Operator (--)

Deepak Prasad6 min read