Compare commits

..

2 Commits

Author SHA1 Message Date
Kai Sellmann 98718f1797 Merge pull request 'verschoben' (#1) from kts into main
Reviewed-on: #1
2024-10-15 16:29:45 +02:00
Kai Sellmann fbbe88224c verschoben 2024-10-15 16:26:52 +02:00
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
public class ThreadAuslesen {
public static void main(String[] agrs) {
// Anzahl der Prozessoren auslesen
var nr = Runtime.getRuntime().availableProcessors();
System.out.println("Anzahl der Prozessoren auf diesem Rechner: " + nr);
// Weitere Daten aus aktuellen Thread lesen
var self = Thread.currentThread();
System.out.println("Name: " + self.getName());
System.out.println("Prio: " + self.getPriority());
System.out.println("ID: " + self.threadId());
}
}