
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

966 Views
The serial number of a CPU is a unique identifier which is given to a particular CPU by the manufacturer to each of them. Its main purpose is to track and identify the hardware for warranty claim. In this article, we are going to write a java program to get CPU serial number for windows machine. Central Processing Unit, in short CPU, is the brain of the computer. Using WMIC Command In this approach, we will use wmic command in java code. The wmic is a command line tool for working with Windows management. It stands for Windows Management Instrumentation ... Read More

2K+ Views
URL known as Uniform Resource Locator is a string used to specify the location of web resources like web pages, images, videos, and files on the internet. URL helps to easily access them and helps to retrieve the resources from the web servers. URL is also known as an Internet address or web address. In this section, we will be discussing how to get the different components of a URL in Java. Components of a URL Below are the components of a URL − Protocol − ... Read More

494 Views
In Java, a string is also an object. It is the object of the String class. A String is a sequence of characters. The last index of a particular word in a string is nothing but the position of the last occurrence of that word in the string. The index of a character in a string defines or tells the position in the string. The position or Index always starts from 0. In this section, we are going to discuss how to implement a Java program to find the last index of a particular word in a string. Strings are ... Read More
197 Views
Here, we will demonstrate the usage of static inner class using the Java program. Before diving deep into the topic, let us get acquainted with the term Static Inner Class . Static Inner Class An inner class is the one, which is defined within another class. A Static Inner Class is a nested class that is a static member of the outer class. Other static members can be used to access it without first instantiating the outer class. A static nested class lacks access to the instance variables and methods of the outer class, much like static member’s java. Example ... Read More
5K+ Views
We will demonstrate how total marks and percentages are calculated using Java programs. The term total marks refer to the summation of all the available marks, while the term percentage refers to the number obtained by dividing the calculated marks by total marks and multiplying the resultant by 100. percentage_of_marks = (obtained_marks/total_marks) × 100 Problem Statement Given a Java program to calculate the total marks and percentage of a student in a given set of subject. Input marks = { 69, 88, 77, 89, 98, 100, 57, 78 } Output Total Marks is: 656 Total Percentage is: ... Read More
328 Views
Here, the usage of Hexadecimal shall be demonstrated through the Java Program. Let us get acquainted with the term Hexadecimal before seeing a Java program. The Hexadecimal is a type of number system that has a base value of 16. There are 16 symbols representing hexadecimal numbers. These symbols or values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Each digit represents a decimal value. The hexadecimal numbers from 0 to 9 are equivalent to decimal numbers from 0 to 9. Further, A represents 10, B represents 11, C represents ... Read More
157 Views
Here, we will demonstrate the availability of the default constructor of the super class to the sub class by default through Java Program. Before diving deep into the topic, let us get acquainted with the term Constructor, Super class, and subclass. Constructor A special method in Java is considered for the initialization of an object. The name of the constructor is the same as the class name and it does not return anything. A default constructor is invoked by itself whenever an object is created using a new keyword. There are following three types of constructors in Java ... Read More

1K+ Views
The special characters, also known as metacharacters, in Java Regex holds a specific meaning within the regex syntax and must be escaped if you want to use them as regular characters. Here, we will demonstrate escaping characters in Regex through Java Program. But, before diving deep into the topic, let us get familiar with the term Regex in Java. What is Regex? It is an acronym for a Regular expression. It is an API that offers users to define String patterns that are useful for finding, modifying, and editing strings. A couple of areas of strings where Regex is ... Read More

230 Views
Hamming distance between two strings of equal length is the number of all the positions at which a different value exists at the corresponding position of the other string. We can understand this with an example given below − S = “ramanisgoing” T = “dishaisgoing” Here, 5 is the hamming distance between two strings S and T as raman and disha are two words that make a difference in the strings to become equal. Problem Statement However, in this problem, we need to find the hamming distance between two strings that contain binary numbers only. One string would be ... Read More

125 Views
Concatenation is an operator which is used to join one or more than one string to originate a new string which would be a combination of strings that were used to generate it with the help of concatenation. In the following article, we will take the uppercase letters only in the input string. Concatenation is an operator which is used to join one or more than one string to originate a new string which would be a combination of strings that were used to generate it with the help of concatenation. In the following article, we will take the uppercase ... Read More