Found 9832 Articles for Object Oriented Programming

Primitive data type vs. Object data type in Java with Examples

Rudradev Das
Updated on 19-Jan-2024 18:45:00

36 Views

In a Java environment, every variable contains with some data types, which specify the value and type of a sorted identifier. There are two categories − Primitive Data type Non-Primitive Data type or Object data type The primitive data types are some predefined data types with some specific size and type. This method has some standard values with the types know as byte, short, int, long, float, double, char and boolean. When we want to run a primitive structure, then it stores the data in a stack and assign a value for the process. On the other hand, ... Read More

Convert byte[] array to File using Java

Rudradev Das
Updated on 19-Jan-2024 18:40:44

24 Views

The file class is a representation of directory path name in Java with different formats on different platforms. The file class contains the method of different path name which is responsible for deleting and renaming files by using the new directories. It is an abstract class in a string formation which can be either absolute or relative. Algorithm to of Convert Byte[ ] Array to File In this possible algorithm, we are going to show you how to perform a conversion process on a byte() array node to make it a file. By using this algorithm, we are going to ... Read More

Convert ArrayList to LinkedHashMap in Java

Rudradev Das
Updated on 19-Jan-2024 18:29:56

23 Views

The LinkedHashMap Class is an one type of Hash Map which enables an user to maintain a systematic cronology of the elements present into it. This feature also provides the method of insertion, search and deletion in a quick manner. When we need to convert an array list to a linked hash map, we need to set a key value for this and it reflects as the index of an array list. In terms of the process of the iteration and the data sorting, array list and linked hash map; both are same in nature. Here is a general example ... Read More

Convert ArrayList to HashMap in Java

Rudradev Das
Updated on 19-Jan-2024 18:24:42

23 Views

In Java the List is a child interface class which can also represents a Collection set. It is an ordered collection set, consists of the objects where duplicate values can be sorted also. Java array list is a collection framework as it presents into the java.util package and provides the dyanamic array elements in Java. For the ArrayList we do not have to mention the size of the list. On the other hand, the HashMap is a Java collection which can be found as a package in java.until. It contains the data values as a pair of (Key, Value).Basically, there ... Read More

Containerizing Java applications

Rudradev Das
Updated on 19-Jan-2024 18:48:58

28 Views

Containerization is a Java embedded process, which is able to pack the Java service or an application within a software container class. It includes every component which needs to execute the process within the packet. Containerized Java applications have lots of benefits with − Granullar stability − It makes the content more stable and easily scale up the value of the content. Flexibility − It develops the flexibility to enhance the experiment process. Resilience − Helps to avoid the cascading failure of an application. Cost − As the process is the embedded one, so the cost is low. ... Read More

ConcurrentModificationException while using Iterator in Java

Rudradev Das
Updated on 29-Dec-2023 16:35:41

101 Views

If any particular method encountered the concurrent in a multi threaded Java environment during the resource detection then the ConcurrentModificationException might be thrown. In this process the object is a non permissible unit here. Here is an example related to the ConcurrentModificationException in Java − Exception in thread "main" java.util.ConcurrentModificationException at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:000) at java.base/java.util.ArrayList$Itr.next(ArrayList.java:000) atcom.journaldev.ConcurrentModificationException.ConcurrentModificationExceptio nExample.main(ConcurrentModificationExceptionExample.java:00) For this particular process the exception is achieveable when − The exception detected and iteration is in not defined in the method. When the process blocked in a loop of fail fast iterator by using an internal flag called modCount. Algorithm to ConcurrentModificationException in Java In this possible algorithm, we are going to show you how to perform ... Read More

ConcurrentModificationException in Java with Examples

Rudradev Das
Updated on 29-Dec-2023 16:30:42

35 Views

If any particular method encountered the concurrent in a multi threaded Java environment during the resource detection then the ConcurrentModificationException might be thrown. In this process the object is a non permissible unit here. Here is an example related to the ConcurrentModificationException in Java − Exception in thread "main" java.util.ConcurrentModificationException at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:000) at java.base/java.util.ArrayList$Itr.next(ArrayList.java:000) atcom.journaldev.ConcurrentModificationException.ConcurrentModificationExceptio nExample.main(ConcurrentModificationExceptionExample.java:00) For this particular process the exception is achieveable when − The exception detected and iteration is in not defined in the method. When the process blocked in a loop of fail fast iterator by using an internal flag called modCount. Algorithm to ConcurrentModificationException in Java In this possible algorithm, we are going to show you how to perform ... Read More

Concrete Class in Java

Rudradev Das
Updated on 29-Dec-2023 16:22:49

45 Views

The concrete class is a base regular implementation which is declared initially for the all other methods related to it. This class do not have any unimplemented method, which is also can be extended to an abstract class on an interface class. We can create an object class by using a new key word class. The process can inherit an another abstract class. This process is also known as the 100% implemented class present in Java. There are so many advantages and disadvantages of a concrete class in Java − Advantages − The process serve to decompose the ... Read More

Compressing and Decompressing files in Java

Rudradev Das
Updated on 29-Dec-2023 16:20:04

59 Views

Reading data of a particular file and and compress some files into a zip, is a process of encapsulation in Java. There are two compressing and decompressing classes in a Java environment, which provides the data deflate compression format. They are − DeflaterOutputStream class − used to compress the files into a deflate format such as GZIPOutputStream. InflaterInputStream class − used to decompress the files in a deflate format such as GZIPInputStream. Here is an example of the process how we can compress a file into a Zip file in Java − try { File file = ... Read More

Compiler Class In Java

Rudradev Das
Updated on 29-Dec-2023 16:14:29

43 Views

A native code is a coding formation that can be run in a Java Virtual Machine. The compiler class, provides a support as well as give us a space to convert a Java code to a native code. This a public package which embedded in java.lang.Compiler.command() package in a Java environment. Here is an example fo a compiler class in Java − class of the NewClass$CompilerClass Name Value Is: null value Is the compilation successful here? : false value Is the compilation successful using str here? : false value Algorithm to Operate With a Compiler Class in Java ... Read More

1 2 3 4 5 ... 984 Next
Advertisements