How can a class be accessed, If no access modifiers are
declared?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
If a class is marked with no access modifiers then it is
given "package" access by default which means it can be
instantiated or subclasses by other classes in the same
package but it is inaccessible to classes outside the same
package.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
the default access will be resticted to the classes with in
the same package
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / babu
If a there is no access modifier specified to a class then it
takes the access modifier as Default modifier.Default Access modifier scope is package scope.so this class scope also package scope to access the classes which is having in the same package.
| Is This Answer Correct ? | 0 Yes | 0 No |
What restrictions are placed on method overloading and method overriding?
What is compile time polymorphism?
20 Answers CTS, Elementus Technologies, Oracle,
What is a short in java?
write a program to create an vector with string(add,remove) operation.and value should be enter through keyboard.
design an lru cache in java?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
i would like to attend for an interview of datalab technologies company i want to know the pattern of imnterview.
class A { class B { psvm(String args[]) { } } } if the prg saved in A.java whats the o/p?
what is Assertion?
What are 3 boolean operators?
what is class.forname() and how it will be useful ?
Can we serialize static variables in java?