- 7

Fill in the blanks to call the method "hello" from main: public static void main(String[ ] args) { ; } static void hell

Fill in the blanks to call the method "hello" from main: public static void main(String[ ] args) { ; } static void hello() { System.out.println("hi"); }

29th Jun 2017, 7:21 AM
Walter Mugo
Walter Mugo - avatar
14 odpowiedzi
+ 3
Where is the blank? I cant see... Is this what you mean? class Program { public static void main(String[ ] args) { hello(); } static void hello() { System.out.println("hi"); } }
29th Jun 2017, 7:41 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 2
question: Fill in the blanks to declare a ''Person'' class with a ''sayHello()'' pure virtual function and override it in the derived ''Student'' class. answer: class Person { public: virtual void sayHello() = 0; }; class Student : public Person { public: void sayHello() { cout << "Student says hello"; } }; Unlock Hint
29th Dec 2018, 2:20 PM
Shubham Nama
Shubham Nama - avatar
+ 1
class Program { public static void main(String[ ] args) { hello(); } static void hello() { System.out.println("hi"); } }
21st Jun 2018, 12:27 PM
Rustam Erik
Rustam Erik - avatar
0
Fill in the blanks to declare a ''Person'' class, with the ''hello()'' virtual function, and then declare a ''Student'' class that inherits from the ''Person'' class and overrides its ''hello()'' virtual function. virtual class public
6th Jun 2020, 7:54 PM
Frederick John Suerte
Frederick John Suerte - avatar
0
19th Jan 2021, 6:19 AM
Lova kumar Devarapu
Lova kumar Devarapu - avatar
0
ans: new @ start
12th Dec 2021, 3:17 AM
Benmar N. Sibonga
Benmar N. Sibonga - avatar
0
Fill in the blanks to create a valid main method that outputs a text.
15th Jun 2023, 10:12 PM
Auwal Isa
0
Help me out
15th Jun 2023, 10:12 PM
Auwal Isa
- 2
Fill in the blanks to declare a ''Person'' class with a ''sayHello()'' pure virtual function and override it in the derived ''Student'' class. Answer: class Person { public: virtual void sayHello() 0; }; class Student : Person { public: sayHello() { void cout << "Student says hello"; } };
21st Sep 2020, 8:20 PM
OjeifoIduma
- 3
yeah..thanks
29th Jun 2017, 8:07 AM
Walter Mugo
Walter Mugo - avatar
- 5
Thank you
9th Dec 2018, 2:07 PM
joy hind
joy hind - avatar
- 5
think you virtual = public void
22nd Feb 2020, 1:29 PM
Ragavi Madhu
- 7
help me out guys
29th Jun 2017, 7:21 AM
Walter Mugo
Walter Mugo - avatar
- 9
Machine m = new Machine() { m Override public void () { System.out.println("Hi"); } }
23rd Feb 2020, 2:44 PM
mohan sharma
mohan sharma - avatar