A Java program in bluej having a function SayNa() that prints Java is easy to learn with bluej
Answers
Answered by
25
Answer:
First used a class to define the function SayNa(). Here the name of the class is Test within which we have defined the function which will print the given statement. Now after that we just called that function from the main class by creating the object of the super class.
class Test {
public void SayNa() {
System.out.println("Java is easy to learn with bluej");
}
}
class Main {
public static void main(String[] args) {
Test t = new Test;
t.SayNa();
}
}
Answered by
3
Explanation:
use this method...I hope it will be useful
Attachments:
Similar questions
Math,
6 months ago
Math,
6 months ago
Social Sciences,
6 months ago
Biology,
1 year ago
Math,
1 year ago