Java beginners - unforgettable lessons

xiaoxiao2021-03-06  69

JAVA, using JBuilder X.

As a old bird using Delphi for more than 5 years (, I am still in use Delphi 5), naturally, I will not make JBuilder to make a contrast. A rough impression is that in comparison, JBuilder simply cares for programmers, and Delphi is lacking too much. JBuilder has too many Delphi (including the latest Delphi 8), including automatic grammatical inspection when typing code, support for reconstructed support, support for Javadoc, integration of CVS and other version management tools, Integration of JUnit, etc. From using delphi to use JBuilder, it is Liu Wei to enter the big garden, dazzling and full of joy!

Open the veil of the Java language, contact it intimate, I don't want to have a way for a while. Details in the details.

The Java language is too different from Delphi (languages). For example, .java file. A Java file can only have a class of public (there can be multiple private classes). There is no such limit in Delphi. For example, a .PAS file in Delphi can belong to multiple packages, and according to Java rules, .java must stall the name of the package, and can only belong to a package. There is so much mystery of a .java file.

Turning back the head. I want to make a simple JSP application in accordance with the examples of the textbook, so I first created a class called Circle in class, and then plan to do unit testing of this class. Originally, adding a TestCase in jbuilder is very convenient --new a testcase, then do step according to the Wizard prompt, the key is to select the class you want to test. As a result, after I made the method, I didn't see the IDE to generate any new .java file for me. If you are alert, please teach a master of the neighbor. After the master, it still has no results according to law. If you are helpless, please ask another master. As a result, he and I sighed, almost desperate, his eyes moved, grabbed the BUG. It turned out to be because the name of the Circle class is not in line with the specification.

and many more! Which one is specified?

No words. yield.

Brought a refactor, change the class name "Circle". After that, I can't afford to "such as the method", I finally produced a test case frame for me.

Good, very good. Unforgettable lesson.

At the end, I added it. The second master didn't get it. I suggested that I will restart JBuilder. He said, "Maybe the jbuilder's bug problem, it may be fine - whenever we see inexplicable phenomena, Restart it. "

转载请注明原文地址:https://www.9cbs.com/read-120068.html

New Post(0)