Hi,
My question is whether I can create my own number type in Java or not? For instance, there exists max and min limits for integer,long,double and float built-in types. But,I want to add two 50 digit numbers. To do this, can I create my own number type and add them using "+"(plus/add) java operator?
Actually I am using a linux program galculator which can do that : 9999999999999999999999999999999999445+666666666666 666666666666666666 = 1,00000006667e+37
Doing such mathematics calculations is important for calculator applications. Just to clarify that I do not need to code which adds two 50 digit number, that is out of my question, that is just for giving an example why I need to create such a custom type.
Any guide is appreciated. Thanks.