Java String Practice Test-1

What will be output of the following program?

public class whileloop {
public static void main(String[] args) {
String str = " ";
int fname = 0;
str = "Test java";
fname = str.indexOf("Testing");
System.out.print(fname);
     }
}

Which below class is thread safe?

When there are a lot of required to update in data then below which should be preferred?

Java String Practice Test-1 Read More »