In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created. In some cases, an object is considered immutable even if some internally used attributes cha...

Read More

A socket is a mode of inter-process communication (may or may not be on two separate physical machines). An example can be communication between two JVMs. In simple terms a socket is an endpoint for communication. There can be two kind of sockets based on what kind of communication is needed, connection less or connection-oriented. In case of conne...

Read More

In this post we will discuss about the complete implementation for connecting to a remote SFTP server and how can we execute different SFTP commands like ls, pwd, put and get a file from a remote SFTP server. The main goal of this post is : Consider we have a server as Host A where our client Java application is deployed. And we have a remote SFTP ...

Read More

In this post we will discuss about downloading and uploading files from and to remote SFTP server using JSch. Normally when we create a Session and open a sftp channel from that session as described in this post, we land on the home directory of the remote SFTP server. And we may require changing directory to upload and download files to and from o...

Read More

What is URI, URL and URN? Anyone who is working on web or does some networking stuff come across abbreviations. So the question arise that whether there is any difference between these three ,Wikipedia has detailed explanation https://en.wikipedia.org/wiki/Uniform_Resource_Identifier. These three terms in some or the other way are related to some n...

Read More

Immutable means Not changeable. All Java variables are by default mutable. An Object is immutable if there is no way you can change its fields after it has been constructed. Tools for creating making objects of a class immutable: Using the final keyword. Make variables private and provide no public accesses to the outside world to change them. The ...

Read More

public static void main() in Java We see a main() method in every Java application, but have you ever wondered why do we need it?   What is the purpose of main() method? It is the entry point to the code. Let us say that you decide to write an application that will store the employee details, add, delete and modify them. And say that your applicati...

Read More

1.  What is the difference between transient and volatile variable in Java? Transient: In Java, it is used to specify the variable is not being serialized. Serialization is a process of saving an object’s state in Java. When we want to persist and the object’s state by default, all instance variables in the object are stored. In some cases, if we w...

Read More

File Uploading is a very common task in any web application. Here we will demonstrate  Spring File upload using Spring MVC File Upload for single file. For this we will create sample application using maven and spring. The sample project is can be looked from previous post. Or Download the project from github. The project structure will look like t...

Read More

Adding Maven Dependencies: org.quartz-scheduler quartz 2.2.3 Creating Quartz Job: Job is a class which you want to run to pe...

Read More

What is a File? A computer file is a resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is "durable" in the sense that it remains available for other programs to use after the program that created it has finished executing. In Java there are several ways in which w...

Read More

A close relationship between XML and Java has existed since the early days of the XML effort. One of the first public statements about this relationship came from Sun Microsystems' Jon Bosak, chair of the XML Working Group. He said, "XML gives Java something to do." But it works the other way as well: Java lets XML do something useful. What is XML?...

Read More

In this article we will see how to create csv files in Java using OpenCSV dependency. In a maven project, add the opencsv dependency in your pom.xml     com.opencsv     opencsv     3.9 or download the jar file from maven central. Next, use CSVWriter clas...

Read More

Map is not a part of Collection ? Strange. This was by design. Mappings are not collections and collections are not mappings. Collections are group of related Objects. Where as Map are key – value pairs. In every figure of Collection family Map can be viewed as a external member. Consider the following figure: Now let us have some discussion about ...

Read More

FOLLOW US ON LinkedIn



Explore Tutu'rself