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

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -