Sobes.tech

Java

[isim] sordu: ELK, Prometheus ve izleme yığını hakkında bana anlat — bunlar nedir, ne kullandın, en iyi hangi konuda anlaşıyorsun?

215

class StackTask { public static void main(String[] args) { a(15); } public static void a(long item) { b(item); } public static void b(long item) { c(item); } public static void c(long item) { d(item); } public static void d(long item) { System.out.println(item); } }

152

public static void a(long item) { b(item); System.out.println(item); } public static void b(long item) { c(item); } public static void c(long item) { d(item); } public static void d(long item) { System.out.println(item); item = 20L; // тут }

149

Sınıf Görev { özel statik int sayıcı = 0; genel statik void main(String[] args) throws Exception { var thread1 = new Thread(() -> artır()); var thread2 = new Thread(() -> artır()); thread1.start(); thread2.start(); thread1.join(); thread2.join(); System.out.println(sayıcı); } özel statik void artır() { for (int i = 0; i < 5000; i++) { sayı++; } } }

148
/3