string = 10;
(string); //OUTPUT IS 10
( ) will now print ‘10′ on the browser.
But we cannot change the datatype of one variable in Java. Java will show the error.
int number = 10;
number = "hello Java"; //ERROR!!!!!!!