PS_Ch8_Q2

 package com.company.Ch8_39_PracticeSet;


class cellphone {
void ring() {
System.out.println("ringing...");
}

void vibrate() {
System.out.println("Vibrating...");
}
}

public class PS_Ch8_Q2 {
public static void main(String[] args) {
cellphone galaxyA30 = new cellphone();
galaxyA30.ring();

cellphone iPhoneX = new cellphone();
iPhoneX.vibrate();
}
}

Comments

Popular posts from this blog

#24_Stack_using_an_array

Ch2_09_PrecedenceAndAssociativity

Ch9_43_Ex3_GuessTheNumber