Searching for "%"

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 is the difference between a JDK and a JVM?

Answer

JDK is Java Development Kit which is for development purpose and it includes execution environment also.


JVM is Java Virtual Machine which is a run time environment for the compiled java class files .Hence you will not be able to compile your source files using a JVM.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is the most important feature of Java?

Answer Java is a platform independent language.
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

Q:

For printing out strings, there are echo, print and printf. Explain the differences.

Answer - echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:

and it will output the string "Welcome to TechInterviews!" print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

Would you initialize your strings with single quotes or double quotes?

Answer Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

How do you call a constructor for a parent class?

Answer parent::constructor($value)
Report Error

View answer Workspace Report Error Discuss

Subject: PHP