
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2310 Articles

Samual Sam
996 Views
In this article, we will learn how to format strings into a table using Java. Java's System.out.format() method is a convenient way to display formatted output. We will define a string format that specifies column widths to ensure uniform spacing, allowing us to create a neat table layout. By using ... Read More

Samual Sam
812 Views
In this article, we will learn to measure the time taken to sort an array in Java. We will look at two methods to calculate sorting time: using the Date class and the System.nanoTime() method. First, we will use the Date class to track the time before and after the ... Read More

Samual Sam
840 Views
In this article, we will learn to get the seconds since the beginning of the Java epoch. To get the seconds since the beginning of epochs, you need to use Instant. The method here used is ofEpochSecond() method. The epoch is the number of seconds that have elapsed since 00::00:00 ... Read More

Samual Sam
696 Views
In this article, we will learn to take a character input from the user and convert it into a string using Java. The toString() method of the Character class converts the character to a string. Problem Statement Write a program in Java to convert a character to a string. Input Enter ... Read More

Samual Sam
1K+ Views
In this article, we will learn to display a table with columns in the output using Formatter in Java. The table will have headings and show different calculations of an array of floating-point numbers. The first column will display the original number, the second will display the number rounded up, and ... Read More

Samual Sam
874 Views
In this article, we will reverse the elements of an array up to a specified position using Java. You will learn how the program takes an array, reverses the first part of it up to a given index, and prints the modified array. An array can be reversed upto the ... Read More

Samual Sam
3K+ Views
In Java, converting integers to different numeral systems can be easily achieved using built-in methods. The Integer.toOctalString(int) method allows you to convert an integer to its octal string representation. This is particularly useful in applications that require data representation in octal format. To convert integer to octal in Java, use ... Read More

Samual Sam
1K+ Views
In this article, we will subtract two integers and check if the result causes an overflow in Java. To check for Integer overflow, we need to check the Integer.MAX_VALUE with the subtracted integers result, Here, Integer.MAX_VALUE is the maximum value of an integer in Java. Let us see an example ... Read More

Samual Sam
2K+ Views
In this article, we will learn to remove path information from a filename returning only its file component using Java. The method fileCompinent() is used to remove the path information from a filename and return only its file component. This method requires a single parameter i.e. the file name and ... Read More

Samual Sam
918 Views
In this program, we will demonstrate how to retrieve the parent directory of a file using the File class in Java. The name of the parent directory of the file or directory can be obtained using the method getParent() method using the java.io package. This method returns the parent directory path name ... Read More