Wednesday, May 25, 2022

Top 5 Cloud Computing Platforms Java Programmers Should Know

Cloud computing is Hot, it's the biggest IT trend of the last few years and will continue to grow strong in the coming future. Cloud computing provides several not-so-easy-to-ignore advantages, especially to public and small enterprises, which cannot afford to own and maintain expensive data centers. Since most online businesses nowadays need high availability, scalability, and resiliency, with-in a quick time, it's not possible to achieve all these on your own, and cloud computing becomes the best alternative here. Cloud service providers like Amazon Web Services (AWS) has helped several firms to remain focus on their business, without worrying for IT and infrastructure too much, this has yield big result for them.

How to Set Classpath for Java on Windows and Linux? Steps and Example

What is CLASSPATH in Java? Classpath in Java is the path to the directory or list of the directory which is used by ClassLoaders to find and load classes in the Java program. Classpath can be specified using CLASSPATH environment variable which is case insensitive, -cp or -classpath command-line option or Class-Path attribute in manifest.mf file inside the JAR file in Java.  In this Java tutorial, we will learn What is Classpath in Java, how Java resolves classpath and how Classpath works in Java alongside How to set the classpath for Java in Windows and UNIX environment. 

Monday, May 23, 2022

Difference between Direct, Non Direct and Mapped ByteBuffer in Java?

ByteBuffer is one of the important classes of Java NIO API. It was introduced in java.nio package on JDK 1.4, it not only allows you to operate on heap byte arrays but also with direct memory, which resides outside the JVM. There are mainly three types of ByteBuffer in Java - Direct Byte Buffer, Non-Direct ByteBuffer, and mapped byte buffers. You can create both direct and non-direct buffers using java.nio.ByteBuffer class, while MappedByteBuffer is a subclass of ByteBuffer, which is created by FileChannel.map() method, to operate on memory-mapped file

Wednesday, May 11, 2022

String vs StringBuffer vs StringBuilder in Java? Example

Difference between String, StringBuffer, and StringBuilder
The String is one of the most important classes in Java and anyone who starts with Java programming uses String to print something on the console by using famous System.out.println() statements. Many Java beginners are not aware that String is immutable and final in Java and every modification in String creates a new String object. For example, when you get the substring, you get a new String, when you convert uppercase String to lowercase, a new String is created. Even when you remove space by calling the trim() method, a new String is returned. 

Sunday, May 8, 2022

Java 8 forEach() Loop Example

Java 8 has introduced a new way to loop over a List or Collection, by using the forEach() method of the new Stream class. You can iterate over any Collection like List, Set, or Map by converting them into a java.util.sttream.Stream instance and then calling the forEach() method. This method performs given operation on every element of Stream, which can be either simply printing it or doing something else. Since stream can be sequential or parallel, the behavior of if this method is not deterministic if used with a parallel stream

Difference between Transient, Persistent, and Detached Objects in Hibernate

In the Hibernate framework, an entity can be in three states, transient, persistent, and detached. When an object is in a transient state, it is commonly referred to as a transient object, similarly, if it is in persistence and detached state, it is known as a persistent and detached object. When an entity is first created using the new operator like new User() and not associated with Hibernate session like you haven't called session.save(user) method then it is known as a transient object. At this stage, Hibernate doesn't know anything about this object and the object doesn't have any representation in the database like a corresponding row in the User table.

Friday, May 6, 2022

How Long does It take To Learn Linux?

Hello guys, if you want to learn Linux but not sure how to start then you have come to the right place. Earlier, I have shared best places to learn Linux and best Linux books for beginners and Linux interview questions with answers and in this article, I Am going to share the best way to learn Linux and answer frequently asked question, how long does it take to Learn Linux. In general, you can learn Linux in one weekend but it can take weeks before you become a Linux master as there are a lot of Linux commands and concepts to master. In this article, I will answer this question objectively depending upon your goal, for example, for a developer it can take a  week to Learn Linux but for System Admin it could be months because they need more in-depth knowledge.