Object variables in java are a hybrid of pointer and


Both pointer and reference variables take memory addresses as values.

They provide the power of indirect addressing, and are necessary for dynamic data structures. The main difference is in how de-referencing is performed.

(a) Use an example to show how to define a pointer variable in your favorite language. Give code fragments in the same language to illustrate and explain the different ways pointer variables can be used in an assignment statement, both on the left and right hand sides.

(b) Use an example to show how to define a reference variable in your favorite language. Give code fragments in the same language to illustrate and explain the different ways reference variables can be used in an assignment statement, both on the left and right hand sides.

(c) Object variables in Java are a hybrid of pointer and reference variables. Use an example to show how to define an object variable in Java. Give code fragments to illustrate and explain when Java object variables behave like pointer variables and when they behave like reference variables.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Object variables in java are a hybrid of pointer and
Reference No:- TGS02895359

Expected delivery within 24 Hours