https://stackoverflow.com/questions/13424816/jsoup-exclude-children-from-text

여기서 찾은건데


import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; public class Main { public static void main(String[] args) throws Exception { final Document document = Jsoup.parse("<html><head/><body><a href=\"#\" class=\"artist\">Soulive<span class=\"create-play\">Play</span></a></body></html>"); final Element elem = document.getElementsByAttributeValue("class", "artist").first(); System.out.println(elem.ownText()); } }

final 변수는 변경될수 없고

무슨 멀티스레딩할때 주입하는 변수가 final이란건 알겠는데


여기서 굳이 final을 쓸 필요는 뭐임??없음?? 하면 메모리 관리에 유리하다거나 그래요??