Programming

JUnit Display Name - @DisplayName — step-by-step Programming tutorial on Progressive Robot

JUnit Display Name – @DisplayName

URL: https://www.progressiverobot.com/junit-display-name-displayname/ JUnit @DisplayName annotation is used to provide a custom name for the test class and test methods. We can use spaces, special characters, and even emojis in the display name. JUnit Display Name Example By default, [JUnit](/community/tutorials/junit5-tutorial) reporting prints the class name and method name in the IDE test report. We can use […]

Read more
How To Use Loops in Java — step-by-step Programming tutorial on Progressive Robot

How To Use Loops in Java

Writing repetitive tasks is common in programming. Loops are structures for controlling repetitive program flow. Depending on their syntax and logic, there are two main types of loops: `while` and `for` loops. In this tutorial, you will use both types to create repetitive tasks and learn about the benefits and drawbacks of each one.

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

Java FileWriter Example

URL: https://www.progressiverobot.com/java-filewriter-example/ Java FileWriter Java FileWriter class is a part of java.io package. FileWriter is a sub class of java.io.OutputStreamWriter class. FileWriter is meant for writing streams of characters. FileWriter is used to write to character files. Its write() methods allow you to write character(s) or strings to a file. FileWriters are usually wrapped by […]

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

Inheritance in Java Example

URL: https://www.progressiverobot.com/inheritance-java-example/ Inheritance in java is one of the core concepts of Object-Oriented Programming. Java Inheritance is used when we have is-a relationship between objects. Inheritance in Java is implemented using extends keyword. Inheritance in Java Inheritance in Java is the method to create a hierarchy between classes by inheriting from other classes. Java Inheritance […]

Read more
Cómo configurar y invocar funciones en Go — step-by-step Programming tutorial on Progressive Robot

Cómo configurar y invocar funciones en Go

Una función es una sección de código que, una vez definida, se puede volver a utilizar. Las funciones se utilizan para facilitar más la comprensión de su código mediante su división en tareas pequeñas y comprensibles que se pueden utilizar más de una vez en su…

Read more
Cómo escribir comentarios en Go — step-by-step Programming tutorial on Progressive Robot

Cómo escribir comentarios en Go

Los comentarios son líneas que existen en los programas informáticos y que los compiladores e intérpretes ignoran. Incluir comentarios en programas hace que el código sea más legible para los seres humanos, ya que proporciona información o explicaciones sobre lo que cada…

Read more
Использование ldflags для установки информации о версиях в приложениях Go — step-by-step Programming tutorial on Progressive Robot

Использование ldflags для установки информации о версиях в приложениях Go

При развертывании приложений в производственной среде сборка двоичных файлов с информацией о версии и другими метаданными помогает улучшить процессы мониторинга, регистрации данных и отладки за счет добавления идентификационной информации для отслеживания версий сборок. Информация…

Read more
Understanding Vector insert() in C++ — step-by-step Programming tutorial on Progressive Robot

Understanding Vector insert() in C++

URL: https://www.progressiverobot.com/vector-insert-in-c-plus-plus/ Introduction In this tutorial, we are going to learn about vector insert() in C++. As well as look at how it works and can be used to accomplish the insertion operation in different ways with examples. The vector::insert() function in C++ Basically, the vector::insert() function from the STL in C++ is used to […]

Read more
Understanding Package Visibility in Go — step-by-step Programming tutorial on Progressive Robot

Understanding Package Visibility in Go

Visibility in the Go programming language means the file space from which a package or other construct can be referenced. In this article, you will learn how to control package visibility, as well as how to protect parts of your code that should only be used inside your package. To do this, we will create a basic logger to log and debug messages, using packages with varying degrees of item visibility.

Read more
EasyMock Void Method - expectLastCall() — step-by-step Programming tutorial on Progressive Robot

EasyMock Void Method – expectLastCall()

Sometimes we want to mock void methods. EasyMock expect() method can't be used to mock void methods. However, we can use expectLastCall() along with andAnswer() to mock void methods. EasyMock void method When we use expectLastCall() and andAnswer() to mock void methods, we can use getCurrentArguments() to get the arguments passed to the method and […]

Read more
CHAT