. Differentiate between instance and local variables.

Answer Posted / nashiinformaticssolutions

For instance, variables are declared inside a class, and the limited to only a specific object.
A local variable can be anywhere inside a method or a specific block of code. Also, the scope is limited to the code segment where the variable is declared.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function and its uses?

668


When should I use stringbuffer?

667


How many types of exception can occur in a java program?

618


What is collection class in java? List down its methods and interfaces.

625


What java is used for?

754






Give the hierarchy of inputstream and outputstream classes.

699


Can a class be final?

591


What is the difference between class & object?

657


Is multiple inheritance supported by java?

590


Convert a BST into a DLL and DLL to BST in place.

770


What is the major drawback of internal iteration over external iteration?

672


what do you mean by classloader?

638


What are the differences between processes and threads?

625


When is the finally clause of a try-catch-finally statement executed?

619


What is math exp in java?

656