KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
So if I have private static final char[] SOME_CHARS; Is that thread safe? By that I mean if I have multiple threads referring to the chars in that array (but not changing them), will anything go wrong? e.g. private class someThread extends Thread(){ public void run(){ for(int i = 0; i < someIndexInSomeChars;i++){ System.out.println(SOME_CHARS[i]); } } In other words do I need to put the char[] into some sort of Java collection with thread support?
Tags (comma-separated)
Save Edits
Cancel