java - trying to create a class objext iside an other class -



java - trying to create a class objext iside an other class -

i trying create object of class point class interestpoint, words want able utilize points values within interestpoint class without utilize of heredity

public class interestpoint { private point p1; private string aeria; public interestpoint() { this.p1 = new point(); //p1.dysplay1(); } }

edit

no misunderstand when phone call method print point through class functions print me error :

exception in thread "main" java.lang.unsupportedoperationexception: not supported yet. @ point.dysplay1(point.java:29) @ interestpoint.setall1(interestpoint.java:22) @ main.main(main.java:16) java result: 1

thats why posted question :d

re:

exception in thread "main" java.lang.unsupportedoperationexception: not supported yet. @ point.dysplay1(point.java:29) @ interestpoint.setall1(interestpoint.java:22) @ main.main(main.java:16) java result: 1

shoot, you're not showing whole interestpoint class us, method have must like:

public void setall1() { throw new unsupportedoperationexception("not supported yet"); }

the solution rid of throws phone call , set in code makes sense.

public void setall1() { // rid of throw exception phone call // throw new unsupportedoperationexception("not supported yet"); // add together sensible code here }

java class object

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -