Re: Help-New to Java and I am not getting the error messages when I run java complie
Mark Salter <[email protected]>
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <[email protected]> |
On 07/03/2013 02:27, jenniferplaska wrote:
>
>
> All the error are near the bottom--System.out.println---Can someone let
> me know in simple human language(thank you) how I would correct this?
You should really ask on a java mailing list since this really has
nothing really to do with jUnit.
You could also search for the answers too.
The problem is that the code you have added is not anywhere in the
processing flow.
Java is not top down executed; in this code the main method is run, your
added code needs to go within the main method to be executed:-
> public static void main(String[] args)
> {
>
> // Create a Rectangle object.
> Rectangle box = new Rectangle();
>
> // Create a Rectangle object.
> Rectangle box2 = new Rectangle();
>
> box.setLength(10.0);
> box.setWidth(20.0);
> area = box.getArea();
> perimeter = box.getPerimeter();
>
> box2.setLength(20.0);
> box2.setWidth(40.0);
> area = box2.getArea();
> perimeter = box2.getPerimeter();
// placing your additions here would be a good place.
// placing your additions here would be a good place.
// placing your additions here would be a good place.
> }
With the code placed as it is, your compile should be complaining about
'misplaced constructs" or similar.
But there are more problems if the code your are compiling and running
really looks like this.
I would suggest you pick and choose an IDE and debug the code if you
want to see how it works.
--
Mark
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/junit/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/