study24x7
javalearning
www.study24x7.com/page/java
  • Followers
  • Latest Feeds
  • About
  • Review
  • Gallery
  • Question
Interests
Java Technologies

Access modifiers dictate which classes, not which instances, may access features. Methods and variables are collectively known as members. Method and variable members are given access control in exactly the same way. *-* private: makes a member accessible only from within its own class *-* protected: makes a member accessible only to classes in the same package or subclass of the class *-* default: access is very similar to protected (make sure you spot the difference) default access makes a member accessible only to classes in the same package. *-* public: means that all other classes regardless of the package that they belong to, can access the member (assuming the class itself is visible) *-* final: makes it impossible to extend a class, when applied to a method it prevents a method from being overridden in a subclass, when applied to a variable it makes it impossible to reinitialize a variable once it has been initialized *-* abstract: declares a method that has not been implemented. *-* transient: indicates that a variable is not part of the persistent state of an object. *-* volatile: indicates that a thread must reconcile its working copy of the field with the master copy every time it accesses the variable.

study24x7
Write a comment

You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

A

public

B

private

C

protected

D

transient

study24x7
Write a comment

Which JDBC driver Type(s) is(are) the JDBC-ODBC bridge?

A

Type 1

B

Type 2

C

Type 3

D

Type 7

study24x7
Write a comment
  • Santosh Singh
  • test

    Which JDBC driver Type(s) can be used in either applet or servlet code?

    A

    Both Type 1 and Type 2

    B

    Both Type 1 and Type 3

    C

    Both Type 3 and Type 4

    D

    Type 4 only

    study24x7
    Write a comment

    How many JDBC driver types does Sun define?

    A

    1

    B

    2

    C

    3

    D

    4

    study24x7
    Write a comment

    Output.......?

    A

    30

    B

    Compiler Error

    C

    Garbage value

    D

    0

    study24x7
    Write a comment

    What is the use of the final keyword in Java?

    A

    When a class is made final, a sublcass of it can not be created.

    B

    When a method is final, it can not be overridden.

    C

    When a variable is final, it can be assigned value only once.

    D

    All of the above

    study24x7
    Write a comment

    What is the output of this program?

    A

    0

    B

    1

    C

    6

    D

    25

    E

    35

    F

    40

    study24x7
    Write a comment

    What is the output of this program?

    A

    67 95

    B

    162

    C

    65 97

    D

    66 98

    study24x7
    Write a comment

    What is the output of this program?

    A

    64

    B

    65

    C

    66

    D

    67

    study24x7
    Write a comment
    About
    Ratings
    5.0
    out of 5
    7 Ratings
    5 study24x7
     
    6.0
    4 study24x7
     
    0.0
    3 study24x7
     
    1.0
    2 study24x7
     
    0.0
    1 study24x7
     
    0.0