Programming

Java Convert String to double — step-by-step Programming tutorial on Progressive Robot

Java Convert String to double

URL: https://www.progressiverobot.com/java-convert-string-to-double/ Java String to double conversion can be done by many ways. Today we will look into some common ways to convert java string to double primitive data type or Double object. Note that since java supports autoboxing, double primitive type and Double object can be used interchangeably without any issues. Double d1 = […]

Read more
Java FutureTask Example Program — step-by-step Programming tutorial on Progressive Robot

Java FutureTask Example Program

URL: https://www.progressiverobot.com/java-futuretask-example-program/ Sometime back I wrote a post about [Java Callable Future](/community/tutorials/java-callable-future-example) interfaces that we can use to get the concurrent processing benefits of threads as well as they are capable of returning value to the calling program. FutureTask is base concrete implementation of Future interface and provides asynchronous processing. It contains the methods to […]

Read more
Java NullPointerException - Detect, Fix, and Best Practices — step-by-step Programming tutorial on Progressive Robot

Java NullPointerException – Detect, Fix, and Best Practices

URL: https://www.progressiverobot.com/java-lang-nullpointerexception/ java.lang.NullPointerException is one of the most popular [exceptions in java](/community/tutorials/exception-handling-in-java) programming. Anybody working in java must have seen this popping out of nowhere in the java standalone program as well as the [java web application](/community/tutorials/java-web-application-tutorial-for-beginners). java.lang.NullPointerException NullPointerException is a runtime exception, so we don’t need to catch it in the program. NullPointerException is raised in an […]

Read more
Java RandomAccessFile Example — step-by-step Programming tutorial on Progressive Robot

Java RandomAccessFile Example

URL: https://www.progressiverobot.com/java-randomaccessfile-example/ Java RandomAccessFile provides the facility to read and write data to a file. RandomAccessFile works with file as large [array of bytes](/community/tutorials/string-byte-array-java) stored in the file system and a cursor using which we can move the file pointer position. Java RandomAccessFile !Java RandomAccessFile, RandomAccessFile in java, Java RandomAccessFile read write append example RandomAccessFile […]

Read more
Java Socket Programming - Socket Server, Client example — step-by-step Programming tutorial on Progressive Robot

Java Socket Programming – Socket Server, Client example

URL: https://www.progressiverobot.com/java-socket-programming-server-client/ Welcome to Java Socket programming example. Every server is a program that runs on a specific system and listens on a specific port. Sockets are bound to the port numbers and when we run any server it just listens on the socket and waits for client requests. For example, tomcat server running on […]

Read more
Java Thread Example — step-by-step Programming tutorial on Progressive Robot

Java Thread Example

URL: https://www.progressiverobot.com/java-thread-example/ Welcome to the Java Thread Example. Process and Thread are two basic units of execution. Concurrency programming is more concerned with java threads. Process A process is a self contained execution environment and it can be seen as a program or application. However a program itself contains multiple processes inside it. Java runtime […]

Read more
Java SE 8 Interview Questions and Answers (Part-1) — step-by-step Programming tutorial on Progressive Robot

Java SE 8 Interview Questions and Answers (Part-1)

URL: https://www.progressiverobot.com/javase8-interview-questions-part1/ In this post, we are going to discuss some important [Java SE 8](/community/tutorials/java-8-features-with-examples) Interview Questions with Answers. I will write one more post to discuss the remaining Java SE 8 Interview Questions. Java 8 Interview Questions Why do we need change to Java again? Java SE 8 New Features? Advantages of Java SE […]

Read more
JUnit Setup Maven - JUnit 4 and JUnit 5 — step-by-step Programming tutorial on Progressive Robot

JUnit Setup Maven – JUnit 4 and JUnit 5

URL: https://www.progressiverobot.com/junit-setup-maven/ JUnit 4 and JUnit 5 are completely different frameworks. They both serve the same purpose, but the JUnit 5 is a completely different testing framework written from scratch. It's not using anything from JUnit 4 APIs. Here we will look into how to setup JUnit 4 and [JUnit 5](/community/tutorials/junit5-tutorial) in our maven projects. […]

Read more
Mockito ArgumentCaptor, @Captor Annotation — step-by-step Programming tutorial on Progressive Robot

Mockito ArgumentCaptor, @Captor Annotation

URL: https://www.progressiverobot.com/mockito-argumentcaptor-captor-annotation/ Mockito ArgumentCaptor is used to capture arguments for mocked methods. ArgumentCaptor is used with [Mockito verify()](/community/tutorials/mockito-verify) methods to get the arguments passed when any method is called. This way, we can provide additional [JUnit assertions](/community/tutorials/junit-assertions) for our tests. Mockito ArgumentCaptor We can create ArgumentCaptor instance for any class, then its capture() method is […]

Read more
How to find all permutation of a String in Java — step-by-step Programming tutorial on Progressive Robot

How to find all permutation of a String in Java

URL: https://www.progressiverobot.com/permutation-of-string-in-java/ In this tutorial, we will learn how to find the permutation of a String in a Java Program. It's a tricky question and asked mostly in Java interviews. Algorithm for Permutation of a String in Java We will first take the first character from the String and permute with the remaining chars. If […]

Read more
CHAT