2

I created an integer object as well as a primitive int variable! I gave the same value to both. I performed math operations on both to compare if there is any difference.I couldn't find any difference.

So my question is -what is the advantage of using integer object instead of primitive int datatype?

Is there any specific or different kind of operation that can be performed on integer object?

What is the use of creating one?

I searched on google but I was redirected to some other questions related to integer in stackoverflow! I couldn't find any related question. Please help me!

8
  • 2
    read Commented Dec 4, 2015 at 11:42
  • Thanks a lot! I got it now! Commented Dec 4, 2015 at 11:46
  • For details: programmerinterview.com/index.php/java-questions/… Commented Dec 4, 2015 at 11:46
  • this is x vs y question, so you should google same way google.de/… Commented Dec 4, 2015 at 11:47
  • @Mathews Of course C and C++ flags were completely needed here. Commented Dec 4, 2015 at 11:48

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.