
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
Found 7442 Articles for Java

790 Views
Suppose you are given a set of numbers, your task is to write a Java program to print their summation. To find summation, you need to add all the given numbers with the help of addition operator. In Java, a set of numbers can be represented by an array. Let's understand the problem with an example − Example Scenario: Input: number_set = 34, 11, 78, 40, 66, 48; Output: summation = 277 Sum of all the numbers is 277 as 34 + 11 + 78 + 40 + 66 + 48 = 277. Using Iteration The most ... Read More

6K+ Views
There are different ways of viewing web pages in a browser using URL. Here, the methods of doing the same are specified using the Java code. The given URL is first entered by using the Java program. Then the related Webpage is opened in the default browser. This article uses three different approaches for opening the webpage as specified by the URL in the browser through the Java code. Multiple Approaches For these programs, the displaying of the given URL is done using two different approaches. By Using desktop.browse(uri) for the object belonging to Desktop class. By Using javafx ... Read More

1K+ Views
Swastika is a religious symbol of Hinduism, Buddhism, and Jainism. In this article, we will learn to print Swastika by taking user input. Here, are three different approaches for making this design using Java. In all the approaches, the size of the Swastika is decided by the user. The user provides the input for the table or frame size. The Swastika is often used as an example to learn rows, columns, and tabular layout concepts using different languages including Java. Making Swastika using Java. Here, three different approaches are used to make this design using Java − ... Read More

8K+ Views
This article uses various approaches for selecting the commands inserted in the opened command window through the Java code. The command window is opened by using ‘cmd’. Here, the methods of doing the same are specified using Java code. The Command window is first opened using the Java program. It is opened as a child process. If the java program is run in an existing cmd window, another one is opened as a new process. Further, different types of commands are inserted and executed in that opened command window via the java code. These programs may not work in ... Read More

699 Views
This article includes the way to read text files line by line in Java. Here, the three different methods are explained with examples. Storing a file in text format is important especially when data from one structured /unstructured form is transferred to another form. Therefore, basic file transfer systems integrate the txt file reading and writing process as their application components. Therefore, how to use text file reading and writing methods is also important for making the parsers. Multiple Approaches The given problem statement is solved in three different approaches − By using the BufferedReader ... Read More

957 Views
Array is the common way to store similar types of items together in Java. The stored items or values are referred as elements of the array. In this article, we are going to learn how to create an array and print its elements. Printing elements of an array in Java Use the following approaches to print elements of an array − By using for loop By using while loop By using Arrays.toString() method For Loop to Print array elements For loop is used when we know how many times a task needs to be repeated. In this case, ... Read More

823 Views
In this article, we are going to use various approaches for formatting the months using different libraries of Java programming language. There are several ways to display months. Sometimes the months are written as numbers, sometimes the months are written in long form or they are written in short forms. Using java.time.Month In this approach, the months are printed by specifying the month number that starts from the number 1. For instance -> Month.of(1) will give JANUARY. Example In this Java program, we are printing all 12 months name. import java.time.Month; public class ShowMonth { ... Read More

5K+ Views
Eclipse is one of most popular Integrated Development Environment (IDE) used by millions of developers around world. It provides a comprehensive set of tools and features for developing Java applications, web applications, and other software projects. However, like any software, Eclipse may encounter issues and errors that can prevent it from starting up via an application launcher. In this article, we will discuss some common causes of Eclipse startup failure and how to troubleshoot them. Possible Causes of Eclipse Startup Failure Corrupted Installation One of most common reasons why Eclipse fails to start is a corrupted installation. This could be ... Read More

2K+ Views
Java is a popular programming language that is widely used for developing various types of software applications. Linux is one of most popular operating systems used for software development due to its stability, security, and open-source nature. In this article, we will discuss how to install Java on Linux using SSH. SSH (Secure Shell) is a secure network protocol used for remote login to a server. It allows users to log in to a remote server and perform various operations using command-line tools. This makes it an excellent choice for installing Java on a Linux machine. We will be using ... Read More
3K+ Views
Encrypting is the task of transforming information into an unreadable format or cipher text. It is usually done to protect the confidentiality of information. There are many ways and algorithms to encrypt data. One such example is the Playfair cipher algorithm. In this article, we are going to see how to write a Java program to encode a message using Playfair cipher. Playfair cipher makes use of a 5X5 grid or matrix and a set of pre-defined rules. To encrypt, we require a key and the plain text to be encrypted. Steps Now let us see the steps to encrypt ... Read More