Sort by

recency

|

120 Discussions

|

  • + 0 comments

    my code:

    import java.io.; import java.util.;

    class bicycle { String text(){ return " with pedals.";

    }
    

    }

    class moto extends bicycle{ String text(){ return " an engine.";

    }
    moto(){
        System.out.println("Hello I am a motorcycle, I am a cycle with"+ text());
        String ss = super.text();
    
        System.out.println("My ancestor is a cycle who is a vehicle"+ ss);
    }
    

    }

    public class Solution {

    public static void main(String[] args) {
        moto bi = new moto();
    
    }
    

    }

  • + 0 comments

    Method overriding in Java lets a subclass redefine a method from its parent class, allowing for specialized behavior. The super keyword is used to invoke the parent class's method, ensuring the original functionality is preserved alongside the new implementation.

    For more interesting insights and analyses, check out the latest Today IPL Match at for expert match forecasts and updates.

  • + 0 comments

    Method overriding in Java allows a subclass to provide a specific implementation of a method already defined in its parent class. The super keyword is often used in this context to call the parent class's version of the method, ensuring access to inherited functionality.

    Here’s a simple example:

    java Copy code class Parent { void display() { System.out.println("Display from Parent"); } }

    class Child extends Parent { @Override void display() { super.display(); // Calls the Parent's display() method System.out.println("Display from Child"); } } In this example, super.display() calls the parent class's display() method before executing the child's version.

    For more insights into overriding techniques and practical examples, check out related content such as Today IPL Match Prediction 2025, which provides predictions and detailed match analyses for the ongoing IPL season.

    For more insights into overriding techniques and practical examples, check out related content such as Today IPL Match Prediction 2025, which provides predictions and detailed match analyses for the ongoing IPL season.

  • + 0 comments

    Every unwanted message or notification that reaches your phone consumes a bit of data. Over time, dealing with unwanted contacts and managing notifications can add up to significant data usage. By filtering out spam and limiting the number of notifications you receive, What Spam helps reduce your data usage. This feature can be particularly beneficial for people on limited data plans, as it allows them to use their mobile data more effectively for essential purposes rather than on spam notifications.

  • + 0 comments

    working code :-

    String temp=super.define_me();
             BiCycle b=new BiCycle();
             b.define_me(); 
    

    `