how to use assignment operator with classes instead of new () Like wrapper class in java? -


how use assignment operator classes instead of new() wrapper class

integer = 3;  newclass c = 3; // didn't work 

newclass c = 3; --> didn't work

i know there overloading operators in c++ this, how overload assignment operator in java ?!

  1. it's not "equal operator," it's assignment operator.

  2. no, can't that. must use new (or reflection).

  3. java doesn't have operator overloading. (the reason can integer = 3; because autoboxing of primitives built language, not because integer class overloading.)


Comments

Popular posts from this blog

php - Autoloader issue not returning Class -

C++ Program To Find Smallest and Largest Number In Array -

java - How to put two numbers separated by a space into two different arrays -