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

c# - ASP.NET MVC Sequence contains no matching element -

java - Parsing XML, skip certain tags -

rest - How to invalidate user session on inactivity in a stateless server? -