Java

Java Set – Set in Java — step-by-step Programming tutorial on Progressive Robot

Java Set – Set in Java

URL: https://www.progressiverobot.com/java-set/ — Java Set is a collection of elements (Or objects) that contains no duplicate elements. Java Set is an interface that extends Collection interface. Unlike List, Java Set is NOT an ordered collection, it's elements does NOT have a particular order. Java Set does NOT provide a control over the position where you […]

Read more
Java switch case String — step-by-step Programming tutorial on Progressive Robot

Java switch case String

URL: https://www.progressiverobot.com/java-switch-case-string/ Today we will look into Java Switch Case String Example. Being a java programmer, I know the importance of String and how many times it's used for conditional flow. Whether you have a simple method that behaves differently for different input String or a Servlet controller class to check the incoming action and […]

Read more
Java Write to File - 4 Ways to Write File in Java — step-by-step Programming tutorial on Progressive Robot

Java Write to File – 4 Ways to Write File in Java

URL: https://www.progressiverobot.com/java-write-to-file/ Java provides several ways to write to file. We can use [FileWriter](/community/tutorials/java-filewriter-example), [BufferedWriter](/community/tutorials/java-bufferedwriter), java 7 [Files](/community/tutorials/java-files-nio-files-class) and [FileOutputStream](/community/tutorials/java-fileoutputstream) to write a file in Java. Java Write to File ![java write to file, write file in java](images/java-write-to-file-section-1.png) Let's have a brief look at four options we have for java write to file operation. FileWriter: […]

Read more
JSTL Tutorial, JSTL Tags Example — step-by-step Programming tutorial on Progressive Robot

JSTL Tutorial, JSTL Tags Example

URL: https://www.progressiverobot.com/jstl-tutorial-jstl-tags-example/ JSTL stands for JSP Standard Tag Library. JSTL is the standard tag library that provides tags to control the JSP page behavior. JSTL tags can be used for iteration and control statements, internationalization, SQL etc. We will look into JSTL Tags in detail in this JSTL tutorial. Earlier we saw how we can […]

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
Priority Queue Java — step-by-step Programming tutorial on Progressive Robot

Priority Queue Java

URL: https://www.progressiverobot.com/priority-queue-java/ Every now and then we need to process items of a queue in a particular order. Priority queue is a Data Structure that does the job. Java priority queue is different from “normal” [queue](/community/tutorials/java-queue). Instead of “First-In-First-Out”, it retrieves the items in order of their priority. Priority Queue Java The java.util.PriorityQueue class, provides […]

Read more
ServletContextListener Servlet Listener Example — step-by-step Programming tutorial on Progressive Robot

ServletContextListener Servlet Listener Example

URL: https://www.progressiverobot.com/servletcontextlistener-servlet-listener-example/ ServletContextListener is one of the many Servlet Listener we have. This is the fifth article in the series of Java Web Application, you might want to check out earlier four articles too. [Java Web Application](/community/tutorials/java-web-application-tutorial-for-beginners "Java Web Application Tutorial for Beginners") [Servlets in Java](/community/tutorials/servlet-jsp-tutorial "Java Servlet Tutorial with Examples for Beginners") [Servlet Session […]

Read more
Template Method Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Template Method Design Pattern in Java

URL: https://www.progressiverobot.com/template-method-design-pattern-in-java/ Template Method is a behavioral design pattern. Template Method design pattern is used to create a method stub and deferring some of the steps of implementation to the subclasses. Template Method Design Pattern Template method defines the steps to execute an algorithm and it can provide default implementation that might be common for […]

Read more
How to Compile and Run Java Program from another Java Program — step-by-step Programming tutorial on Progressive Robot

How to Compile and Run Java Program from another Java Program

Have you ever thought if it's possible to compile and run a java program from another java program? We can use Runtime.exec(String cmd) to issue commands to the underlying operating system. We will use the same approach to compile and run a java program from another java program. Compile and Run Java Program from another […]

Read more
CHAT