Searching for "L"

Q:

Should a main() method be compulsorily declared in all java classes?

Answer No not required. main() method should be defined only if the source class is a java application.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Why is the main() method declared static?

Answer

main() method is called by the JVM even before the instantiation of the class, hence it is declared as static.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What are instance variables?

Answer Instance variables are those which are defined at the class level. Instance variables need not be initialized before using them as they are automatically initialized to their default values.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Is Java a pure object oriented language?

Answer

Java uses primitive data types and hence is not a pure object oriented language.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

Does Java support multiple inheritance?

Answer Java doesn't support multiple inheritance.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is difference between Path and Classpath?

Answer

PATH and CLASSPATH are operating system level environment variables. PATH is used to define where the system can find the executables (.exe) files whereas CLASSPATH is used to specify the location of .class files.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What do you mean by platform independence?

Answer

Platform independence means that we can write and compile the java code in one platform (Eg Windows) and can execute the class in any other supported platform (Eg Linux,Solaris,etc).

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What’s the difference between htmlentities( ) and htmlspecialchars( )?

Answer htmlspecialchars only takes care of , single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP