Computer Science, asked by kranthipsr, 1 year ago

A Java program in bluej having a function SayNa() that prints Java is easy to learn with bluej

Answers

Answered by qwtiger
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 reethujj777
3

Explanation:

use this method...I hope it will be useful

Attachments:
Similar questions