Analysis of Ethereum java source code
The code block in the middle of
{}
class indicates that the following code block is a "class". For the definition of class, please refer to
class https://ke..com/item/%E7%B1%BB/6824577#viewPageContent
test indicates that the name of this class is test, According to the specific purpose of the class, any method named
main indicates that the following code block is a method, and public static void main (string [] args) is a specific method (main method), which indicates the entry of program execution
void indicates that the method does not return the value
public as the access control character, It means that the class is public. Similarly, public can be used in front of class, method and attribute to indicate that the class, method and attribute are public, that is, they can be accessed anywhere. For access control characters, see
for details https://jingyan..com/article/bad08e1e8e9a9b09c851219f.html
static indicates that this method is static, See
for details https://ke..com/item/%E9%9D%99%E6%80%81%E6%96%B9%E6%B3%95
or
https://ke..com/item/static/9598919#3 The definition format of
class is:
access control class class name
{
access control data type attribute name
access control character data type method name ( data type parameter name)
{
/ / method content
}
}
where
can be public private protected
data type can be int, string, char and other basic types, http://www.runoob.com/java/java-basic-datatypes.html
can also be a class, and the return of a method can be void , This means that this method does not return data
it's a long story. Look for an introctory book
first https://www.hu.com/question/19848946? rf=19752221
To associate jar package with source code, the steps are as follows:
-
click "window" - & gt& quot; Preferences" -& gt; & quot; Java" -& gt; & quot; Installed JRES"
-
2; Installed JRES" On the right is the List pane, which lists the JRE environments in the system. Select your JRE, and then click & quot; Edit", A window (edit JRE) will appear
-
3. Select this item of rt.jar file: "C: / / program files / Java / JRE"_ 1.5.0_ After expansion, you can see "source attachment: (none)", click "source attachment" on the right, and select "Src. Zip" file in your JDK directory
-
5; ok", It's over< br />
further down is the core part
first of all, it is better to be familiar with the use of this proct and framework. If you can't use it, just look at the source code, there will be many places that you can't understand. So be sure to use it. You don't have to use every detail, at least the overall workflow needs to be understood
secondly, we need to know what parts it includes, such as container class, storage part, network communication part and so on. We need to know the overall framework structure
thirdly, we can find some in-depth source code analysis of the framework in advance to help us understand it
finally, we need to look at the details of the source code
generally speaking, a proct has several different implementations that do similar things. For example, ActiveMQ has multiple persistence layers, including JDBC, kahadb and memory storage. Generally, you should grasp one of your most common ways, such as JDBC. Other storage methods are the implementation of the same storage interface.
do you understand the basic Java code? Just look at the servlet, and then continue the foreground development.
String url = "http://www..com/?tn=&word=%B3%CF%BD%DC";
WebClient client = new WebClient(BrowserVersion.FIREFOX_3_6);
HtmlPage page = client.getPage(url);
HtmlPage page2 = page.getElementById("page").getElementsByTagName("a").get(3).click();
HtmlPage page3 =page2.getElementById("46").getElementsByTagName("a").get(0).click();
System.out.println(page3.getTitleText());
如果还是不太清楚,要以找我我指导你一下
