Introduction of Azure Container Apps for Java DevelopersYoshio Terada
This is the introduction for Java user to use the Azure Container Apps.
Azure Container Apps can be used for the runtime of Cloud Native or Microservices. It is very easy to create and deploy the environment and also it implemented the Java Functionality. It means that Java developer can deploy their application from Java source code or artifact.
Jakarta EE Microproile Update JJUG 2020 MayYoshio Terada
This is an explanation of Jakarta EE & MicroProfile update for Japanese Java Users Group at Java 25th Anniversary event.
In this session, I explained about the history of J2EE/Java EE/Jakarta EE as well as MicroProfile.
In order to understand the current situation of Jakarta EE and MicroProfile, this explanation may be useful.
Azure RedHat OpenShift - Red Hat Forum 2019Yoshio Terada
This is an explanation at RedHat Forum 2019 in Japan.
The actual demonstration of "Azure RedHat OpenShift" is existing on the following URL.
https://youtu.be/oz7I_BQuttU
This is the explanation of Azure Spring Cloud.
In the explanation, I showed the demo of Azure Spring Cloud.
You can see my demo on following URL.
https://youtu.be/lxvTPMkqeo4
This is the presentation which was showed at Microsoft Tier1 event de:code 2019. In this presentation, I showed that there is a lot of option for Java Developer to use the Microsoft Azure.
This presentation was used for Japan Container Days 2018.
I explained the important point to use the k8s on Production environment for Japanese Audience.
The Experience of Java on Kubernetes with Microservices from HackFestYoshio Terada
Yoshio Terada is a Senior Cloud Developer Advocate and Java Champion at Microsoft. He has previously worked as a GlassFish Evangelist at Sun Microsystems and Java Evangelist at Oracle Japan. In his presentation, he covers topics like Java basics, Docker basics, his experience with Kubernetes, DevOps, and provides a Java demo. He emphasizes overcoming problems when learning new technologies to help build a better future.
4. Java Puzzlers のルール
public class JavaPuzzlers {
public static void main(String... args) {
System.out.println(“Japan Java User
Group Presents!”);
}
}
1.Japan Java User Group Presents!
2.Java Puzzlers
3.0xCAFEBABE
4.その他
6. 問題1:They Live
public class TheyLive {
public static void main(String... args) {
int sum = 0;
for (int i = Integer.MIN_VALUE;
i < Integer.MAX_VALUE; i++) {
if (i != 0) sum += i / Math.abs(i);
}
System.out.println(sum);
}
}
7. 選択肢1:They Live
選択肢
1. -1
2. 0
3. 1
4. その他
public class TheyLive {
public static void main(String... args) {
int sum = 0;
for (int i = Integer.MIN_VALUE;
i < Integer.MAX_VALUE; i++) {
if (i != 0) sum += i / Math.abs(i);
}
System.out.println(sum);
}
}
9. 解答1:They Live
選択肢
1. -1
2. 0
3. 1
4. その他
public class TheyLive {
public static void main(String... args) {
int sum = 0;
for (int i = Integer.MIN_VALUE;
i < Integer.MAX_VALUE; i++) {
if (i != 0) sum += i / Math.abs(i);
}
System.out.println(sum);
}
}
12. 解決1:どうやって直すのか
public class TheyLive {
public static void main(String... args) {
int sum = -1;
for (int i = Integer.MIN_VALUE+1;
i < Integer.MAX_VALUE; i++) {
if (i != 0) sum += i / Math.abs(i);
}
System.out.println(sum);
}
}
15. 問題2:MarshmallowMan
public class MarshmallowMan{
public static void main(String... args) {
int sum = 0;
for (int i = 1; i <= 10; i++) {
sum += foo(i);
}
System.out.println(sum);
}
public static long foo(long l) {return l;}}
16. 選択肢2:MarshmallowMan
public class MarshmallowMan {
public static void main(String... args) {
int sum = 0;
for (int i = 1; i <= 10; i++) {
sum += foo(i);
}
System.out.println(sum);
}
public static long foo(long l) {return l;}}
選択肢
1. 0
2. 45
3. 55
4. コンパイルエラー
18. 選択肢2:MarshmallowMan
public class Sum {
public static void main(String... args) {
int sum = 0;
for (int i = 1; i <= 10; i++) {
sum += foo(i);
}
System.out.println(sum);
}
public static long foo(long l) {return l;}}
選択肢
1. 0
2. 45
3. 55
4. コンパイルエラー
19. 解説2:
sum = sum + data コンパイルエラー
sum += data コンパイルエラーにはならない
int sum = 0;
long data = 10;
System.out.println(sum += data);
この問題と同じ
20. 解説2:
JLS §15.26.2. Compound Assignment Operators
E1 op= E2
E1 = (T) ((E1) op (E2)) ※ T は E1 の型
つまり
sum = (int) (sum + data)
https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2
41. 問題5:The Fog
class Ship<T> {
private T t;
public Ship(T t) { this.t = t; }
public void setCrew(T t) { this.t = t; }
public int hashCode() { return Objects.hashCode(t); }
}
public class TheFog {
public static void main(String... args) {
Map<Ship<String>, String> map = new HashMap<>();
Ship<String> a = new Ship<>("A");
Ship<String> b = new Ship<>("B");
map.put(a, "a"); a.setCrew("B");
map.put(b, "b");
System.out.println(map.values().size());
}}
42. 選択肢5:The Fog
class Ship<T> {
private T t;
public Ship(T t) { this.t = t; }
public void setCrew(T t) { this.t = t; }
public int hashCode() { return Objects.hashCode(t); }
}
public class TheFog {
public static void main(String... args) {
Map<Ship<String>, String> map = new HashMap<>();
Ship<String> a = new Ship<>("A");
Ship<String> b = new Ship<>("B");
map.put(a, "a"); a.setCrew("B");
map.put(b, "b");
System.out.println(map.values().size());
}}
選択肢
1. 0
2. 1
3. 2
4. Exception