- 1

Which method used to declare " hello"()

void. ()

20th Mar 2020, 8:32 AM
haruna habeeb
haruna habeeb - avatar
1 Odpowiedź
+ 6
You can write any method to declare hello() like public void hello() { //no return type System.out.print("Hello"); } public String hello() { //return String value return "Hello"; } you can call these method like this: hello(); //this is for first hello method System.out.print(hello()); //this for second hello method.
20th Mar 2020, 9:11 AM
A͢J
A͢J - avatar