Found 9326 Articles for Object Oriented Programming

Java Error - All Illegal Modifier Combinations for Methods w.r.t Abstract

Rushi Javiya
Updated on 24-Jul-2023 12:43:43

205 Views

In Java, there are certain illegal modifier combinations when it comes to abstract methods. Abstract methods are methods declared in an abstract class, which do not have an implementation in the abstract class itself but must be implemented in its concrete subclasses. Understanding these illegal modifier combinations is crucial to writing proper, error-free Java code. Let's explore these illegal combinations and why they are not allowed in Java. Abstract Class and Abstract Method in Java In Java, an abstract class is a blueprint that cannot be directly instantiated. It serves as a template for other classes and can contain both ... Read More

Java Developer Learning Path - A Complete Roadmap

Rushi Javiya
Updated on 24-Jul-2023 12:40:24

712 Views

Java, a widely-used programming language, has become the backbone of many robust and scalable software applications. With its platform independence, extensive libraries, and vast ecosystem, Java offers a lot of opportunities for aspiring developers. If you are looking to embark on a journey to become a proficient Java developer, this comprehensive guide will outline a learning path that covers essential concepts and technologies. Understanding the Basics of Java To begin your Java developer journey, it's crucial to grasp the basics of the language. Develop a comprehensive understanding of fundamental concepts like variables, data types, operators, control structures (if-else, loops), and ... Read More

Java Program to Delete a Node From the Middle of the Circular Linked List

Rushi Javiya
Updated on 24-Jul-2023 12:40:00

109 Views

In this DSA problem, we will learn to delete the middle node from the circular linked list. We can delete the middle node from the circular linked list as we delete the middle node from the regular linked list. We need to locate the previous and next node of the middle node and connect them directly to remove the middle node. Problem Statement We have a circular linked list and need to delete the middle node from the linked list. If the linked list contains an even number of nodes, (N/2)th node is the middle node. Sample Examples Input 90 ... Read More

Java Program to Delete a Node From the Ending of the Circular Linked List

Rushi Javiya
Updated on 24-Jul-2023 12:39:05

81 Views

In this DSA problem, we will learn the remove the last node of the circular linked list. We set Null to the next pointer of the second-last node to remove the last node from the regular linked list, but in the circular linked list, we need to set the root node to the next pointer of the second-last node. Problem Statement We have given a circular linked list containing the N nodes. The given task is to delete the last node of the linked list. Sample Examples Input Hello -> World! -> How -> are -> You -> Doing? ... Read More

Java Program to Delete a Node from the Beginning of the Circular Linked List

Rushi Javiya
Updated on 24-Jul-2023 12:38:34

106 Views

In this DSA problem, we will learn to create a circular linked list and delete the node from the beginning of that. The circular linked list connects the last node with the first node. To remove the first node from the linked list, we can make the second node a root node, and connect the last node with the second node. Problem statement We have given a circular linked list. We need to delete the starting node of the linked list. Sample examples Input 1 -> 2 -> 3 -> 4 -> 8 -> 10 Output 2 -> ... Read More

Java Integer Cache

Rushi Javiya
Updated on 24-Jul-2023 12:37:54

210 Views

Java is one of the most used programming languages nowadays, as it contains advanced features and functionalities. In every new version of Java, its developers add new features and functionalities, and an integer cache is one feature introduced in Java 5. In this tutorial, we will understand what integer cache is in Java and the importance of that in programming. What is Integer Cache in Java? From the 'cache' word, readers can guess that we are talking about storing integer in the memory and reusing it whenever required. Yes, you have guessed correctly. But the question comes to mind is ... Read More

Java Equivalent of C++'s lower_bound() Method

Rushi Javiya
Updated on 24-Jul-2023 12:37:21

570 Views

In this problem, we will learn to implement the equivalent algorithm of C++'s lower_bound() method in Java to find the lower bound index of a given element in the sorted array. Lower bound − The lower bound is the index in the sorted array, such that the index contains the minimum element greater or equal to the targeted element. We can use the searching algorithms to find the lower bound of any element in the sorted array without using built-in methods. Here, we will use the linear search, iterative, and recursive binary search to get the lower bound of any ... Read More

ProcessBuilder in Java to create a basic online Judge

Shriansh Kumar
Updated on 21-Jul-2023 22:36:54

165 Views

Online judge is a platform that serves to compile, execute and evaluate programming solutions to a given problem. It is widely used for problem solving and organizing programming contests. To create a basic online judge in Java using ProcessBuilder class, define an instance of ProcessBuilder and specify the name of program and commands as arguments The ProcessBuilder class is used to create and manage operating system processes. It allows us to chain multiple processes, where the output of one process can be used as the input to another process. Also, it provides a variety of built-in methods such as redirectOutput(), ... Read More

How to Add JAR file to Classpath in Java?

Shriansh Kumar
Updated on 21-Jul-2023 22:27:58

3K+ Views

While developing any Java application, we may require to use external libraries or modules that are packaged as JAR files. To use a JAR file in those Java applications, we need to add it to the classpath, which is a list of locations where the Java runtime can find and load classes. This article aims to explain how to add a JAR file to the classpath. We will start this explanation by introducing JAR Files. Java JAR File The full form of JAR is Java Archive File. Java provides this feature to bundle multiple Java program files as well as ... Read More

getParameter() - Passing data from client to JSP

Shriansh Kumar
Updated on 21-Jul-2023 22:04:59

442 Views

JSP stands for Java Server Pages and is used for the purpose of developing web based applications. A single JSP page consists of HTML tags for static content and JSP tags to construct dynamic content. The JSP tags start with ‘’. We save our JSP file with the extension ‘.jsp’. The getParameter() method of JSP takes an argument and retrieves data associated with it from the source and further pass it to the destination. The source could be an HTML or JSP page and the destination could be another JSP page. Syntax request.getParameter("source"); Steps of Passing data from client ... Read More

Advertisements