java, javafx, android, spring programing collection and Age of Empires 4
java standard edition
addObject
arraylist
bufferedreader
colors
comparator
createTable
datatypes
date
enum
generateHTML
hashmap
inheritance
insertSQL
interface
JSONfromWEB
jsoup
list
loop
pointMatrix
queue
readCSV
regex
sqlToObject
stack
static
super
treemap
updateTable
writeCSV
java FX
3DCharacterMoving
3DMaterialList
DroneMotor
FlowPane
Hello
KeyCode
KeyMovement
ObservableList
Pane
RotateImage
rotateSphere
android
APIview
listview
ToastTimer
touchMovement
WriteReadFile
spring framework
add2Numbers
HelloWorld
RESTful
TomcatServlet
java objects
Apple
starseite
/
lessons
/
se
fx
android
spring
/
star wars api
add2Numbers
2022-06-24 19:19:55
add 2 Numbers with
tags:
spring
view source
RESTful
2022-06-23 04:41:22
tags:
spring
view source
TomcatServlet
2022-06-17 07:51:58
tags:
spring
tomcat
view source
HelloWorld
2022-06-17 07:51:52
tags:
spring
helloworld
view source
add2Numbers
screenshot
description
source code
################################################################## ############### CalculatorApplication.java ############### ################################################################## package com.example.calculator; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class CalculatorApplication { public static void main(String[] args) { SpringApplication.run(CalculatorApplication.class, args); } } ################################################################## ############### CalculatorController.java ############### ################################################################## package com.example.calculator; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController public class CalculatorController { @GetMapping("/calculator") public Calculator add(@RequestParam(value = "zahl1", defaultValue = "0") int zahl1, @RequestParam(value = "zahl2", defaultValue = "0") int zahl2) { return new Calculator(zahl1, zahl2); } } ################################################################## ############### Calculator.java ############### ################################################################## package com.example.calculator; public class Calculator { public int zahl1; public int zahl2; public Calculator(int zahl1, int zahl2) { this.zahl1 = zahl1; this.zahl2 = zahl2; } public String getTitle() { return "add 2 Zahlen"; } public int getZahl1() { return zahl1; } public int getZahl2() { return zahl2; } public int getResult() { return zahl1 + zahl2; } }