How to run shell commands using SSH connection in Java

How to Run shell commands using SSH connection in Java In this tutorial we will see how to run shell commands on a SSH enabled server using Java. I am using JSch java library to connect to remote ssh server and execute the shell commands.You can download the latest version of JSch.jar file from the official website. If you are having a maven [...]

Read more

How to convert string to byte array and vice versa in Java

How to convert string to byte array and vice versa in Java Sometimes we have to convert String variable into a Byte array format, for example, in encryption or to display [...]

Most common mistakes made by beginners in Java programming

Most common mistakes made by beginners in Java programming Which is the most common mistake every beginner makes while coding in Java programming language? There are some [...]

Java program to check happy number using recursion

Java program to check happy number using recursion Write a Java program to check if the given number is happy or not is a commonly asked coding interview question. To solve [...]

Write a Java program to merge two sorted arrays

Java program to merge two sorted arrays Write a Java program to merge two sorted arrays is one of the frequently asked Java coding interview questions. In this article we [...]

ZonedDateTime format example in Java 8

ZonedDateTime format example in Java 8 ZonedDateTime class in Java 8 is an immutable representation of a date-time with a time-zone. It is equivalent of GregorianCalendar [...]

Java Multithreading Interview Questions and Answers

Java Multithreading Interview Questions and Answers Like Collections, Multithreading is also an important topic in Java. Whether you are a fresher or experienced, if you go [...]

Java program to zip and unzip files

Java program to zip and unzip files The java.util.zip package provides classes for reading and writing the standard ZIP and GZIP file formats. With this package you will [...]

Inspiring Programming Quotes to Motivate Yourself

Inspiring Programming Quotes to Motivate Yourself Just knowing a programming language is not enough to become a great programmer. You need real dedication to excel in your [...]

Frequently asked Java Collections interview questions and answers

Frequently asked Java Collections interview questions and answers Java Collections Framework is the fundamental aspect of Java programming language. A good understanding of [...]

Frequently asked Java String interview questions and answers

Frequently asked Java String interview questions and answers String is the most important class in Java. There can be hardly any Java interview without a question about [...]