2) Suppose there are 5 directories having lot of files (say
txt files) in each directory. 2 things :-
2.1) You want to search for filenames which have a
particular pattern.
2.2) Out of these filtered files you want to search for a
particular keyword or a search string.
How can you achieve this?
No Answer is Posted For this Question
Be the First to Post Answer
What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?
What is java and why do we need it? Explain
Why singleton pattern is better than creating singleton class with static instance?
Can I import same package/class twice?
how many ways to create Thread and which one is good? runnable interface ot Thread class?
What are new features introduced with java 8 ?
What is data string?
What are the skills required for core java?
String Reverse in Java...!
What is a singleton class? Give a practical example of its usage.
Given: 11. public static void main(String[] args) { 12. Integer i = uew Integer(1) + new Integer(2); 13. switch(i) { 14. case 3: System.out.println(”three”); break; 15. default: System.out.println(”other”); break; 16. } 17. } ‘What is the result? 1 three 2 other 3 An exception is thrown at runtime. 4 Compilation fails because of an error on line 12.
What is a ternary operator in java?