Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

  Take Quiz (Monsoon) Beta Version !!
  Do You have Qs. in your Mind ??? Ask it as Qs. or MCQs or create it as polling Live Now !!

JAVA Programming :: Packages

Home > JAVA Programming > Packages > Discussion

7. What is the output for the below code ?

package bean;
public class Abc {
public static int index_val = 10;
}
package com;
import static bean.Abindex_val;
public class Test1 {
public static void main(String... args) {
System.out.println(index_val);
}
}

Answer: Option A

Explanation :

The static import construct allows unqualified access to static members without inheriting from the type containing the static members. J2SE 5.0 onwards it allows static import like import static bean.Abindex_val; and can be use directly System.out.println(index_val);

Post Your Answer Here:     

No Discussion on this question yet!