User Profile

Collapse

Profile Sidebar

Collapse
skumar22
skumar22
Last Activity: Nov 7 '06, 03:52 PM
Joined: Oct 25 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • skumar22
    started a topic typecast
    in C

    typecast

    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?
    See more | Go to post

  • skumar22
    replied to static functions
    in Java
    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
    ...
    See more | Go to post

    Leave a comment:


  • skumar22
    started a topic static functions
    in Java

    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() {}
    }
    See more | Go to post
No activity results to display
Show More
Working...