17 solutions available
Question 4Name various visibility modifiers in a class.
Question 5Define scope and visibility.
Question 6(b)What will be the scope of a protected class ?
Question 6(c)What will be the scope of a default class ?
Question 6(d)What will be the scope of a private class?
Question 7(a)What will be the visibility of a public class ?
Question 7(b)What will be the visibility of a protected class ?
Question 7(c)What will be the visibility of a default class ?
Question 7(d)What will be the visibility of a private class ?
Question 8How does Java resolve variables having same name? Give code example.
Question 9What are the getter and setter methods?
Question 10How many types of methods are generally there in a class ?
Question 11What are the advantages of encapsulation?
Question 1A class encapsulates ............... .datamethodsfunctionalityall the above
Question 2Through which access specifier, a class makes its element visible to all ?publicprivateprotectedfriendly
Question 3If a local variable is having the same name as that of a global class element, then ithides the global variablegets hidden by global...
Question 6A member method that can change the value of a private data member is called ............... .settergettermanageraccessor