Nora Hamad

Nora Hamad @nora_hamad

عضوة جديدة

Normal (Sequential) Processing
class Hi {
public void show() { |/ creating a method show()
for (int i = 1; i <= 5; i++) {
System. out-println("Hi");
}
}
class Hello {
public void show() { // creating a method show()
for (int i = 1; i < 5; i++) {
System.out.println("Hello");

}
public class Test { // Test main class where the program starts execution
public static void main(String args) {
Hi objl = new Hil); // creates an object of Hi
Hello obj2 = new Hello(); // creates an object of Hello
objl. show();
obj2.show() ;
}
}
0
13

يلزم عليك تسجيل الدخول أولًا لكتابة تعليق.

تسجيل دخول

خليك أول من تشارك برأيها   💁🏻‍♀️