- kafkacat commands
docker run -d --name=landoop -p 127.0.0.1:8081-8083:8081-8083 -p 127.0.0.1:9581-9585:9581-9585 -p 127.0.0.1:9092:9092 -p 127.0.0.1:3030:3030 -p 127.0.0.1:2181:2181 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev
| public class Calculator { | |
| interface IntegerMath { | |
| int operation(int a, int b); | |
| } | |
| public int operateBinary(int a, int b, IntegerMath op) { | |
| return op.operation(a, b); | |
| } | |
docker run -d --name=landoop -p 127.0.0.1:8081-8083:8081-8083 -p 127.0.0.1:9581-9585:9581-9585 -p 127.0.0.1:9092:9092 -p 127.0.0.1:3030:3030 -p 127.0.0.1:2181:2181 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev
| package com.golonzovsky.streams; | |
| import lombok.AllArgsConstructor; | |
| import lombok.Data; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import java.io.BufferedReader; | |
| import java.io.FileReader; | |
| import java.time.Year; |
?Every time you are putting a plus between two strings you are creating a new string.
In Java strings are immutable, once you create a string you can never change it. It looks like you changed it , but it's not true. You are creating a new string, you are not appending to the existing string.
Use StringBuilder class instead. StringBuilder appends new content, it does not
| Scanner userinput = new Scanner(System.in); | |
| int value; | |
| do{ | |
| System.out.println("Enter an integer value: "); | |
| value = userinput.nextInt(); | |
| }while(value !=5); | |
| System.out.println("Got 5!"); |
| //This is my note for Java Collection Framework course taught by John. | |
| //Original credit: John from caveofprogramming.com | |
| //All of his videos can be found in youtube.com | |
| /**--------------------------------- | |
| | 1. ArrayList | |
| | | |
| */--------------------------------- | |
| 1. | |
| -ArrayList class implements the class that is expandable. |
| /* | |
| * To change this license header, choose License Headers in Project Properties. | |
| * To change this template file, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| //package oefs; | |
| import java.util.Scanner; | |
| /** |
| import java.util.Formatter; | |
| import java.util.Scanner; | |
| public class CheckBTW{ | |
| public static void main(String args[]){ | |
| System.out.print("Geef een getal: "); |