Type Here to Get Search Results !

Write a JAVA program to create a package named pl, and implement this package in Ex class.

 package p1;

public class ex

{

public ex()

{

System.out.println("Package Created");

}

public void display()

{

System.out.println("Hello!Welcome");

}

}

Program: save as ex1.java in ur Current Directory

import p1.*;

class ex1

{

public static void main(String[] a)

{

ex e=new ex();

e.display();

}

}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Featured post

M

M