![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 9326 Articles for Object Oriented Programming
![Avinash Gupta](https://www.tutorialspoint.com/assets/profiles/701626/profile/60_691552-1692786372.jpg)
122 Views
In this problem, our task is to find the length of the longest possible subsequence present in two strings such that every letter of the subsequence must be a vowel. With the help of the recursive algorithm and iterative algorithm, the given problem statement can be solved. In English Alphabet, there exist five vowels named 'A', 'E', 'I', 'O', 'U'. Subsequence Vs. Substring: In Subsequence, we may take characters in a non-continuous way, but in Substring, we can take only continuous characters. Ex: In String “TutorialsPoint”: “tri” is a subsequence but not a substring. While “tor” is both subsequence ... Read More
![Avinash Gupta](https://www.tutorialspoint.com/assets/profiles/701626/profile/60_691552-1692786372.jpg)
198 Views
In this problem, our task is to remove all the duplicate characters present in the string other than the first occurrence of every character. Also, it's required to solve the problem without using any extra space, and the Space complexity must be O(1). Various approaches are used in this article. The Boolean array is defined in one approach to determine the repetition of the characters where the index of Boolean array is mapped to each alphabet. In the second approach, the concept of the Bit manipulation is used to remove the repeated characters from the resultant string. Let's explore ... Read More
![Avinash Gupta](https://www.tutorialspoint.com/assets/profiles/701626/profile/60_691552-1692786372.jpg)
303 Views
In this problem, our task is to sort the array of integers based on several factors of numbers present in the array as a priority. The array is the best way to store similar types of elements in java. But if the number of factors becomes equal in any two numbers, then as a second priority, this algorithm sees numerical value. Factors are the numbers by which the given number is divisible entirely without leaving any remainder. This article uses various approaches to sort elements based on several factors. To show you some instances Instance-1 If Array = ... Read More
![Priya Mishra](https://www.tutorialspoint.com/assets/profiles/661458/profile/60_2023165-1685510322.jpg)
317 Views
Introduction Java supports eight types of operators; the “!” operator is one of them. In Java, an operator is a symbol used to execute operations. Operators are entities that can modify the values of operands. Java makes authoring, compiling, and debugging code simple. It is helpful in creating code that can be reused and applications that are modular. It was created with the goal of having a few implementation dependencies as feasible. Let’s discuss in detail about the Java operators, “!” operator and where to use it with some working examples. Java operators Operators in Java are symbols that are ... Read More
![Priya Mishra](https://www.tutorialspoint.com/assets/profiles/661458/profile/60_2023165-1685510322.jpg)
95 Views
Introduction In real life, we can call tables, chairs, lamps, etc. objects as they have some attributes and functions. We can say that anything that has attributes or properties and some functionality like a lamp has a stand and a bulb and it can light up a room so it is an object. In Java also, we have objects and they have their own properties. Objects are basically the instance of the class and the class provides a blueprint for the creation of an object. Let’s have a brief discussion on objects and how to create an object in Java. ... Read More
![Priya Mishra](https://www.tutorialspoint.com/assets/profiles/661458/profile/60_2023165-1685510322.jpg)
645 Views
What is the Full Form of JAVA? The full form of Java is "Just Another Virtual Accelerator". Java is not an abbreviation but some programmers made a full form. Basically, Java doesn’t have any full form or special meaning. This full form is used jokingly by the programmers. J Just A Another V Virtual A Accelerator Related Links Some of the related topics, you may like to read: Overview of Java programming language Features of Java programming language
![Neetika Khandelwal](https://www.tutorialspoint.com/assets/profiles/507566/profile/60_4169811-1661487212.jpg)
198 Views
You are given a keypad of mobile, and the keys that need to be pressed, your task is to print all the words which are possible to generate by pressing these numbers. Input Output Scenarios Let’s go through an example to understand this more: Input str = "32" Output [gd, hd, id, ge, je, ie, gf, hf, if] The characters that can be formed by pressing 3 is g, h, i and by pressing 2 characters d, e, f can be formed. So all the words will be a combination where first character belongs to g, h, ... Read More
![Neetika Khandelwal](https://www.tutorialspoint.com/assets/profiles/507566/profile/60_4169811-1661487212.jpg)
261 Views
The task is to generate a string that consists of characters ‘a’ and ‘b’ which satisfies the condition mentioned below: str must have a length of A+B. The character 'a' must appear A times and the character 'b' must appear B times within the string. The sub−strings "aaa" and "bbb" should not appear in str. After generating the string, it should be printed. One possible solution is to first generate a string with all 'a's and 'b's, with 'a' occurring A times and 'b' occurring B times. Then, we can shuffle the string randomly until we find a ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
135 Views
In this problem, we need to find the length of the longest subsequence having the same left and right rotations. We can solve the problem using the brute-force approach, finding all possible subsequences of the given string and checking each subsequence one by one to see if it has the same left and right rotation. We find the maximum length of such subsequence. The problem with this approach is that it is very time-consuming as its time complexity is O(2N). So, we will learn to write optimized code in this approach. Problem statement – We have given string str containing ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
838 Views
A prime number is a positive integer greater than 1 that is only divisible by 1 and itself. Prime numbers are an essential concept in mathematics and computer science. They are integers that are only divisible by 1 and themselves. Finding prime numbers is an important task in many algorithms, and there are several methods to determine if a number is prime. One such problem is finding the closest prime number to a given number. Problem Statement For a given number find the closest prime number by using Java programming language. Consider the following example - Input ... Read More