CDAC Core Java Practice Questions

21. Which keyword can protect a class in a package from accessibility by the classes outside the package?





Show Answer ?

22. What is the error in the following class definitions? abstract class SY{abstract sum(int x, int y) { }}





Show Answer ?

23. What interface must all interfaces for remote services exted?





Show Answer ?

24. which statement are true?





Show Answer ?

25. Which of the following methods helps in getting the local host ip?





Show Answer ?

26. Which of the Following is not java primitive





Show Answer ?

27. What is the purpose of the main() method?





Show Answer ?

28. getByName() throws ____________ Exception





Show Answer ?

29. clone method is of class





Show Answer ?

30. Which variables can an inner class access from the class which encapsulates it?





Show Answer ?