write a program to print welcome message by using user define method.
Answers
Answered by
2
Explanation:
This java program will print message using class method - here, we will print the message by using same class method and other class method.
This java program will print message using class method - here, we will print the message by using same class method and other class method.In this example we will print a message on screen by creating a class. We will make a separate class in which there is a method named printMessageto print the message. We will create a object of that class in public class in which Main() function is called. Using that object we will call that method and output will be on screen.
Similar questions
Social Sciences,
4 months ago
Business Studies,
4 months ago
Science,
4 months ago
Math,
10 months ago
Math,
1 year ago