JAVA variable as 2 types [closed]

Java does not support union types; however, both of these types share the same base Object class, so you could assign either one of them to a variable defined like this Object something; something = “Hello World!”; something = new ArrayList(); // this is a collection. Odds are that you probably were thinking of a … Read more

How I can correct my c code?

this works perfectly in my environment! #include <stdio.h> #include <stdlib.h> int main() { int error = 1; float correction = 0.1; printf(“error =%d\n”, error); printf(“correction=%0.1f\n”, correction); }