One is fighting

Source: Internet
Author: User


A man is fighting hard.

I haven't written a blog for a long time since I turned my attention to the compiler. In fact, there are still a lot of GAINS and feelings in the next day. Maybe I forced myself to be too tight, so that I got to the point of "mean" time. It has been a week since the compiler was used. (I prefer to use the word "tossing" to describe professional learning ~), The progress seems to be slow. One reason is that the Java skills are not good, and the other is that it is difficult to switch from the abstract compilation Theory to the actual implementation of the project. So far as I write this blog, I only have a clear idea of implementing the first simple simpleminijool language interpreter. However, I have to work hard to implement it, especially for AST operations. Speaking of AST, it hurts. If it wasn't blocked, now I can make a lexical analyzer, Khan ~

In the past few days of "tossing", the harvest is still quite big. First, I have a better understanding of Java inheritance, abstract classes, interfaces, and polymorphism. Secondly, I learned two common design models: simple factory and visitor. A few weeks ago, I once learned about their power in the book "big talk Design Patterns". Now I can hardly remember the example of "Big Bird" giving me a little dish, find a time to see the remaining 21 modes. Finally, I understand the concept and simple implementation method of component-based programming.

Today's harvest is the only simple operation that can be expressed by a program is hashmap ~

The hardships of a person's battle will not be mentioned first. After finishing this road, I will find another time for good mood... It should be more beautiful than there are more complaints. Well, write it here...

Import java. util .*;

Class myhash


Public static void main (string ARGs [])


// Create a hash map.

Hashmap <string, integer> Hm = new hashmap <string, integer> ();

// Put elements to the map

String mum = "John Doe ";

Hm. Put (mum, new integers (343 ));

Hm. Put ("Tom Smith", new INTEGER (123 ));

System. Out. println (Hm. Get ("Tom Smith "));

System. Out. println (Hm. Get ("John Doe "));

Hm. Put ("John Doe", new INTEGER (0x02 ));

System. Out. println ("John Doe's New Balance:" +

Hm. Get ("John Doe "));







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.