![]() ![]() But that aside, did u notice how I used the comments? Yeah, that’s how you should use them. joking, it doesn’t have to be really important… but where the fun in that?ĭid u get it? It’s kinda confusing, right? It was confusing for me the first time □īut we’ll see how this works later on with more examples. * This method will work as an example of how to write a method. Where should we start? Well, it all starts with a … If you put all codes in one single run method, first of all, it’ll be really hard to see and not to mention, slow down the program – since the program will have to read through all the long program to find the code it actually will use.įor this, you will start creating methods. There is nothing wrong with this, except as you advance in the art of programming, you will find your program becoming longer and longer. Until now, I just put all the methods in the run method. * all lines until they see a “*/” or an asterisk and a slash, which signifies the end of a MLC. * They start with “/*” or a slash and an asterisk and they continue on * descriptions of the actor, or key methods in the program. * Mutiple Line Comments (MLC) are generally colored blue. On the other hand, there is a multiple line comments. They are mostly used for commenting on methods and giving short descriptions of small details in the program. The Single Line Comment (SLC) always comes after “//” or two slashes. ![]() One is the single line comment, the other is the … you guessed it – the multiple line comment. ![]() In Greenfoot – as well as some other programs – there are 2 major ways of writing comments. Hi all! Today I wanted to give y’all some info. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |