- Trending Categories
- 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 2616 Articles for Java
966 Views
Recursive Constructor Invocation is a compile time error that occurs when a constructor calls itself. It is similar to recursion where a method calls itself as often as necessary. The method that calls itself is called as recursive method and the constructor that calls itself is called as recursive constructor. In this article, we will understand the Recursive Constructor Invocation error in Java with a few examples. Recursive Constructor Invocation Constructor It is quite similar to methods but the difference is that methods define the behavior of an object but constructor is used to initialize those objects. We can provide ... Read More
305 Views
Solving interesting pattern problems enhances the understanding of loops. They are essential because they help in building a strong foundation of a particular programming language. There are various kinds of patterns including number-based, star-based and alphabetical patterns as well. In this article, we will discuss a few Java programs to print interesting star patterns. Program to Print Interesting Pattern Pattern 1 Approach Declare and initialize an integer ‘n’ that specifies number of rows and columns. Define a for loop that will run till ‘n’. Inside this loop define an if-else block. The if block will print star ‘n’ ... Read More
2K+ Views
Both StAX and SAX are a type of XML parser APIs. Here, API stands for Application Programming Interface and Parser is used to read and extract content from an XML document in desired format. From this line, it is clear that StAX and SAX are used to read XML documents. APIs are a modern way to migrate real time information on the Web. In this article, we will discuss the difference between StAX and SAX Parser in Java. StAX vs SAX Parser XML Its full form is eXtensible Markup Language and it is said to be a data description language. ... Read More
283 Views
The TreeMap and TreeSet, both are the part of Collection Framework classes. There exist a few differences as well as a few similarities in their implementation and working. The TreeMap maintains key-value pair on the other hand the TreeSet does not have this feature. In this article, we will discuss the similarities between both classes of Collection Interface. Collection Interface In Java, collection is an object or we can say a container for simplicity that allows us to group several numbers of objects in a single unit. The collection interface is present at the root of all collection framework interfaces. ... Read More
243 Views
Every time we do surfing on the Web or we download any file from Web, we take a risk of a virus attack. Maybe that file contains some malicious code that can breach the security and gain unauthorized access to system resources. If we are building an application that has users’ sensitive data, for example, a banking system contains confidential data like credit and debit card details, addresses, email and so forth. Then securing those data becomes our foremost priority. In this article, we are going to discuss a few standard practices for protecting the sensitive data of users in ... Read More
664 Views
Non-blocking Server Java NIO (New Input/Output) is a very powerful networking and file-handling application that functions as an alternative to Java's standard IO API. Due to the addition of more sophisticated features since JDK 4's introduction, it has quickly emerged as the preferred I/O system among numerous engineers. The improved support it offers for file handling and file system features is one of the features that distinguish Java NIO. Since the NIO file classes have such incredible capabilities, it is extensively used in file handling. If you look closely, you'll notice that java.nio package specifies the buffer classes employed by ... Read More
273 Views
Overview of Node.js vs Java Java has been a long-standing favorite for programmers worldwide, while Node.js is a relatively new JavaScript runtime environment. This article delves into the differences between Node.js and Java and aims to provide a better understanding of both tools and their respective applications. While we may never settle the question of which is ultimately better, gaining insight into these powerful tools can help us make informed decisions about where and when to use them. What Is Node.js? In 2009, Ryan Dahl created Node.js, a cross-platform JavaScript (JS) runtime environment that enables developers to use JavaScript on ... Read More
699 Views
Overview of Object Model Have you ever thought about how software programs can see and communicate with the components that make them up? The object model is useful in this situation. Developers can represent those components as objects using sophisticated object-oriented techniques thanks to a strong system or interface. The object model is actually so crucial to software development that it's frequently one of the first stages. The object model establishes the framework for a reliable, adaptable, and scalable application design by defining crucial features like inheritance and encapsulation. Are you set to learn more about object-oriented programming? Objects and ... Read More
583 Views
Numbers in Java It's important to understand that the number class isn't a tangible class, but rather an abstract one. Inside it, we have a set of wrapper classes that define its functions. These wrapper classes include Integer, Byte, Double, Short, Float, and Long. You may notice that these are the same primitive data types we previously discussed, but they're represented as individual classes with capitalized names in keeping with class naming conventions. The compiler automatically converts primitive data types into objects and vice versa, based on the requirements of a particular function or program scope, and the number class ... Read More
77 Views
Object Compression in Java Java objects can be stored and transmitted more easily by using a method called Java Object Compression to shrink their size. The object will be compressed using a variety of classes and methods during this process, which can greatly decrease the size of the data. The complete amount of information can be retrieved by the recipient by decompressing the compressed object after it has been sent. When dealing with scarce resources, such as network bandwidth or disc space, this method can be helpful. In this article, we will learn more about Java object compression. What ... Read More