Java

Mockito Tutorial — step-by-step Programming tutorial on Progressive Robot

Mockito Tutorial

URL: https://www.progressiverobot.com/mockito-tutorial/ Mockito is a java based mocking framework, used in conjunction with other testing frameworks such as [JUnit](/community/tutorials/junit5-tutorial) and [TestNG](/community/tutorials/testng-tutorial). It internally uses [Java Reflection](/community/tutorials/java-reflection-example-tutorial) API and allows to create objects of a service. A mock object returns a dummy data and avoids external dependencies. It simplifies the development of tests by mocking external […]

Read more
Random Number Generator in Java — step-by-step Programming tutorial on Progressive Robot

Random Number Generator in Java

URL: https://www.progressiverobot.com/random-number-generator-java/ Today we will look at how to generate a random number in Java. Sometimes we need to generate random numbers in Java programs. For example, a dice game or to generate a random key id for encryption, etc. Random Number Generator in Java !random number generator java There are many ways to generate […]

Read more
SQL Injection in Java and How to Easily Prevent it — step-by-step Programming tutorial on Progressive Robot

SQL Injection in Java and How to Easily Prevent it

URL: https://www.progressiverobot.com/sql-injection-in-java/ What is SQL Injection? SQL Injection is one of the top 10 web application vulnerabilities. In simple words, SQL Injection means injecting/inserting SQL code in a query via user-inputted data. It can occur in any applications using relational databases like Oracle, MySQL, PostgreSQL and SQL Server. To perform SQL Injection, a malicious user […]

Read more
What is a Balanced Binary Tree and How to Check it? — step-by-step Programming tutorial on Progressive Robot

What is a Balanced Binary Tree and How to Check it?

In case of binary trees, if the trees are skewed, they become computationally inefficient to perform operations on. This is the motivation behind making sure that trees are not skewed. Hence the need for balanced binary trees. What is a Balanced Binary Tree Balanced Binary trees are computationally efficient to perform operations on. A balanced […]

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

Composition in Java Example

Composition in java is the design technique to implement has-a relationship in classes. We can use [java inheritance](/community/tutorials/inheritance-java-example "Inheritance in Java Example") or Object composition in java for code reuse. Composition in Java ![composition in java, java composition, java composition example](images/composition-in-java-example-section-1.png) Java composition is achieved by using instance variables that refers to other objects. For […]

Read more
Eclipse OutOfMemory Error Fix by increasing Heap Memory/Permgen Space — step-by-step Programming tutorial on Progressive Robot

Eclipse OutOfMemory Error Fix by increasing Heap Memory/Permgen Space

Eclipse Out of Memory Error happens when you are working on large projects. Sometimes it's because of Permgen space (below Java 8) and sometimes your eclipse memory runs out of heap memory. Eclipse OutOfMemoryError Fix We can increase eclipse memory by providing more Permgen space and heap memory for Eclipse to use. These settings are […]

Read more
How To Install Apache Kafka on Ubuntu 14.04 — step-by-step Linux tutorial on Progressive Robot

How To Install Apache Kafka on Ubuntu 14.04

Apache Kafka is a popular distributed message broker designed to handle large volumes of real-time data efficiently. A Kafka cluster is not only highly scalable and fault-tolerant, but it also has a much higher throughput compared to other message brokers such as ActiveMQ and RabbitMQ. Though it is generally used as a pub/sub messaging system, a lot of organizations also use it for log aggregation because it offers persistent storage for published messages.

Read more
CHAT