Yesterday's 3rd lecture mainly talked about the concept of OOP and the usage of package. The latter is new to use. The following is the assignment, which is relatively simple for newbie reference only, the instructor requested to use JBuilder, but that stuff is not open-source after all. Although its level is poor, there is no difference between open-source and non-open-source ~ However, I agree with open source in spirit.
~ Because the open-source community is our hope that we can beat back to Microsoft.
The weather is still a bit hot today. Rugby is ready for the evening ~~ Lets fight... Wait a minute ~ Fight for what?
/*
Create a sub-package named child. Its basic package name is parent. The sub-package should contain a location class.
The location class contains a method named disp () used to display messages of "Everything is meaningless.
Create a class named parenttest to import the sub-package and call the disp () method of the location class.
Note: The package is a folder. Take parent. Child as an example to compile the location. Java location. Class file.
Put it in parent/child/location. Class
*/
// Package containing location class
Package parent. Child;
Public class location {
Public void disp ()
{
System. Out. println ("Everything is meaningless ");
}
}
// Parenttest
Import parent. Child. location;
Class parenttest {
Public static void main (string [] ARGs)
{
Location A = new location ();
A. disp ();
}
}