| Author |
paint
|
josephine chen
Ranch Hand
Joined: Oct 29, 2002
Posts: 216
|
|
This is from amock exam answer given is 1 . 3 also appears correct right?? which compile withouut error public void paint(Graphics g){ int polyX[] ={1,2,3} int polyY[] ={4,2,3} g.drawPolygon(polyX,polyY,3) } public void paint(Graphics g){ int polyX[] ={1,2,3} int polyY[] ={4,2,3} g.drawPolygon(polyX,polyY) } public void paint(Graphics g){ int polyX[3] ={1,2,3} int polyY[3] ={4,2,3} g.drawPolygon(polyX,polyY,3) } public void paint(Graphics g){ int polyX[] ={1,2,3} int polyY[] ={4,2,3} drawPolygon(polyX,polyY,3) }
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18641
|
|
|
Well, what happens when you try to compile it? That should answer your question.
|
"I'm not back." - Bill Harding, Twister
|
 |
josephine chen
Ranch Hand
Joined: Oct 29, 2002
Posts: 216
|
|
I got it for the 3rd option it is like int polyX[3] ...which is wrong way of declaring an array
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18641
|
|
|
I can't tell what you mean, but if you tried it you must have gotten a compile error, which should answer your question.
|
 |
 |
|
|
subject: paint
|
|
|