when I typecast a float to an int. Does the compiler allocate an additional space?
for eg if I do something like.
float pi = 3.14;
int i = (int) pi;
then an additional space is created for (int) pi ?
If yes then is it the same when I typecast pointers?
User Profile
Collapse
-
I did not understand the part where you say "static means that method is not a part of the class"
And moreover If I do
...Code:class B{ public static void out () {} } class D extends B { public static void out() {} } class I{ public static void main(String[] argv) { B obj = new D(); obj.out; //out of B is called but if u do something like D obj1 = new -
static functions
Hi,
why am I not allowed to override a static function of the base class?
class B{
static out () {}
}
class D extends B {
out() {}
}
No activity results to display
Show More
Leave a comment: