Write a java program to count the number of words present in a string?
No Answer is Posted For this Question
Be the First to Post Answer
We have two methods to create methods the threads. 1. Implementing runnable interface 2. Extending to thread class and overriding run method. Among these two which one is better and why? Please explain me in detail.
hoe can u call a constructor of a private classs to other inherited claa??
What is string english?
What best practices should you follow while writing multithreaded code in java?
What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }
What is string array?
How to make class immutable
Difference between string, string builder, and string buffer?
What are the two types of exceptions in java? Which are the differences between them?
Can we use static class instead of singleton?
What are inner classes or non static nested classes in java?
Hi Friends, can you give difference between extending thread class and implementing runnable interface.