Question: Consider this Java code: int answer = 42; String myName = Earl; Which is/are reference type variables? Both answer and myName answer but not myName

  1. Consider this Java code:

    int answer = 42;

    String myName = "Earl";

    Which is/are reference type variables?

    Both answer and myName answer but not myName neither answer nor myName myName but not answer

  2. Consider this Java code:

    int answer = 42;

    String myName = "Earl";

    Which value(s) will be stored the call stack?

    answer myName

  3. Consider this Java code:

    int answer = 42;

    String myName = "Earl";

    Which value(s) will be stored on the heap (also called the "free store"?)

    answer myName

  4. Which of the following Java statements call static methods?

    int value = Integer.parseInt("1"); String myName = myObject.getName(); double d = Math.pi(); int length = myString.length();

  5. What is the largest possible Java int?

    1024 1048576 2147483648 infinity

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!