//Remember the word that I said to you: 'A servant is not greater than his lord.' If they persecuted me, they will also persecute you. If they kept my word, they will keep yours also.(John 15:20) package com.javarush.task.task16.task1604; /* ÐÑвод ÑÑек-ÑÑейÑа */ public class Solution { public static void main(String[] args) throws InterruptedException { Thread thread = new Thread(new SpecialThread()); thread.start(); System.out.println("*****************"); for (StackTraceElement element : Thread.currentThread().getStackTrace()) { System.out.println(element); } } public static class SpecialThread implements Runnable { public void run() { for (StackTraceElement element : Thread.currentThread().getStackTrace()) { System.out.println(element); } } } } /* ÐÑвод ÑÑек-ÑÑейÑа 1. СоздаÑÑ ÑаÑк (public static клаÑÑ SpecialThread, коÑоÑÑй ÑеализÑÐµÑ Ð¸Ð½ÑеÑÑÐµÐ¹Ñ Runnable). 2. SpecialThread должен вÑводиÑÑ Ð² конÑÐ¾Ð»Ñ Ñвой ÑÑек-ÑÑейÑ. ÐодÑказка: main thread Ñже вÑÐ²Ð¾Ð´Ð¸Ñ Ð² конÑÐ¾Ð»Ñ Ñвой ÑÑек-ÑÑейÑ. ТÑебованиÑ: 1.âÐÐ¾Ð±Ð°Ð²Ñ Ð² клаÑÑ Solution пÑблиÑнÑй ÑÑаÑиÑеÑкий клаÑÑ SpecialThread. 2.âÐлаÑÑ SpecialThread не должен бÑÑÑ ÑнаÑледован Ð¾Ñ ÐºÐ°ÐºÐ¾Ð³Ð¾-либо дополниÑелÑного клаÑÑа. 3.âÐлаÑÑ SpecialThread должен ÑеализовÑваÑÑ Ð¸Ð½ÑеÑÑÐµÐ¹Ñ Runnable. 4.âÐеÑод run клаÑÑа SpecialThread должен вÑводиÑÑ Ñвой ÑÑек-ÑÑейÑ. package com.javarush.task.task16.task1604; * ÐÑвод ÑÑек-ÑÑейÑа * public class Solution { public static void main(String[] args) throws InterruptedException { Thread thread = new Thread(new SpecialThread()); thread.start(); System.out.println("*****************"); for (StackTraceElement element : Thread.currentThread().getStackTrace()) { System.out.println(element); } } } */