Question

what it means to be an "object". write thought  on how objects differ from simple, primitive variables...

what it means to be an "object". write thought  on how objects differ from simple, primitive variables in java

0 0
Add a comment Improve this question Transcribed image text
Answer #1
object is an instance of a class.

Object example:
Integer i = new Integer(); 
Where Integer is a class.  
A class can have instance variables and methods.
So, that public members if class can be accessed by its objects.

primitive variable example:
int i;
Here, there is no class named int.
int is just a keyword in java. 
It does not have methods or variable to access from variable 'i'.
 
Add a comment
Know the answer?
Add Answer to:
what it means to be an "object". write thought  on how objects differ from simple, primitive variables...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Java. For C through H True or false? c. Primitive variables must be objects. d. Integer...

    Java. For C through H True or false? c. Primitive variables must be objects. d. Integer x; generates a compile time error. e. Integer y = new Integer(); generates a compile time error. f. Integer z = new Integer(3); generates a compile time error. g. Integer u = new Integer(3.14); generates a compile time error. h. Integer w = new Integer("345"); generates a compile time error. 1.) What is true of classes that can be used with the enhanced for...

  • java Write a generic method that takes an ArrayList of objects (of a valid concrete object...

    java Write a generic method that takes an ArrayList of objects (of a valid concrete object type) and returns a new ArrayList containing no duplicate elements from the original ArrayList. The method signature is as follows: public static ArrayList UniqueObjects(ArrayList list) Test the method with at least 2 array lists of different concrete object types. Label your outputs properly and show the array lists content before and after calling method UniqueObjects

  • Java - Object Oriented Programming From the game slither.io Identify objects that you can see ...

    Java - Object Oriented Programming From the game slither.io Identify objects that you can see on the picture. Pick one object from part a. Create a class (Java code) for that object which contain data member, method and constructor. Implement the class inside main function by creating that object.

  • Java Homework Question: Explain how class (static) variables and methods differ from their instance counterparts. Give...

    Java Homework Question: Explain how class (static) variables and methods differ from their instance counterparts. Give an example of a class that contains at least one class variable and at least one class method. Don't forget to provide the code. Also, explain why using a class variable and method rather than an instance variable and method would be the correct choice in the example you select.

  • Write a simple Java program with the following naming structure: Open Eclipse Create a workspace called...

    Write a simple Java program with the following naming structure: Open Eclipse Create a workspace called hw1 Create a project called hw1 (make sure you select the “Use project folder as root for sources and class files”) Create a class called Hw1 in the hw1 package (make sure you check the box that auto creates the main method). Add a comment to the main that includes your name Write code that demonstrates the use of each of the following basic...

  • Hi not sure how to do this in Java Write the complete class for an Object...

    Hi not sure how to do this in Java Write the complete class for an Object IceCream. It should have the variables String name and int coldness. Include a Constructor that accepts parameters for all variables. You should also create the methods to String() and clone() with their standard behaviour as discussed in class.

  • Java Task 2: Write a program where you create an ArrayList object that can store letters....

    Java Task 2: Write a program where you create an ArrayList object that can store letters. Show how can you add a letter to the ArrayList, remove a letter from theArrayList, replace a letter in the ArrayList, insert a letter in a specific location in the ArrayList, and display all the letters in the ArrayList. Task 3: Write a program where you create an ArrayList object that can store Circle object (you created circle class in your previous PAs). Create...

  • Software Testing Write a description of what “software quality” means. Is there a simple definition for...

    Software Testing Write a description of what “software quality” means. Is there a simple definition for what quality software is? What attributes make up “quality”? Is quality truly important for the success of software products? How does testing contribute to a quality product?

  • Keep as simple as possible 1. How does a function differ from a module? 2. What...

    Keep as simple as possible 1. How does a function differ from a module? 2. What is the purpose of the RETURN statement in a function? 3. Discuss the relationship between parameterList and argumentList 4. IF the first parameter has the Integer data type and the 2nd parameter has the Double data type, what data types should the first and second arguments have?

  • 1. Explain the differences between a class and an object. 2. Explain what it means to...

    1. Explain the differences between a class and an object. 2. Explain what it means to instantiate an object. 3 .Explain the advantages of using objects over arrays and collections in terms of encapsulation

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT