Searching for "%"

Q:

What is the purpose of declaring a variable as final?

Answer A final variable's value can't be changed. final variables should be initialized before using them.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is the access scope of a protected method?

Answer A protected method can be accessed by the classes within the same package or by the subclasses of the class in any package.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Can a class be declared as protected?

Answer A class can't be declared as protected. only methods can be declared as protected.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Which package is imported by default?

Answer java.lang package is imported by default even without a package declaration.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Can a source file contain more than one class declaration?

Answer Yes a single source file can contain any number of Class declarations but only one of the class can be declared as public.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Does the order of public and static declaration matter in main() method?

Answer No. It doesn't matter but void should always come before main().
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Can a main() method be declared final?

Answer Yes. Any inheriting class will not be able to have it's own default main() method.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is the argument of main() method?

Answer main() method accepts an array of String object as arguement.
Report Error

View answer Workspace Report Error Discuss

Subject: Java