Method Overriding

PHOTO EMBED

Tue Apr 18 2023 17:42:36 GMT+0000 (Coordinated Universal Time)

Saved by @Shankar #instanceblocks #inheritance

class RedBus
{
	void Payment()
		{
			System.out.println(" Inside m1 Parent");
		}
	void Payment(int card)
		{
			System.out.println("Inside m1 card");
		}
	void Payment(String upi)
		{
			System.out.println("Inside m1 string");
		}
	void Payment(String netUN, String netPluse)
		{
			System.out.println("Inside m1 2 string");
		}

	public static void main(String[] args) 
	{
		RedBus d = new RedBus();
		d.Payment("20","fg");

	}

}
content_copyCOPY