Restarting the life of a Java programmer - 1. First time in a different world

This is a strange world, everyone can practice, and the mental skills, magic skills, weapons, etc. of practice are all related to Java. . .

A ray of thought drifted in the darkness for a long time, until this day, he slowly woke up: "Why is this bed so hard? Hey~, what is so cold?"

This ray of thought in the dark was agitated, and I opened my eyes. What caught my eye was a wooden house. All the items in the house were made of the original ecology, except for a metal the size of a keyboard at hand, which was completely intact and a little strange on it. texture.

"Fuck, what's the situation, where is this, have I been kidnapped?"

At this time, an unfamiliar memory flooded into my brain, "Fuck, I've completely traveled. I was a Java programmer in my last life. I worked in a big factory for several years. , fell asleep, and didn't take off his clothes, but hung them up? Could it be a sudden death?"

"Oh my God, I earn hundreds of thousands of dollars every day, and I haven't spent that yet... why is it so miserable?"

With a bang, the door was knocked open by a fat baby boy, "Brother Shang, why are you still in bed, the competition scheduled yesterday is about to start"

In the grief, his thoughts of scolding his mother were interrupted, and he had to return to reality. He learned from memory that the owner of this body was You Shang, and the person who came in was You Xing, who was usually called Fatty.

The Youjia they are in is one of the three major families in this town. The internal factions are not harmonious, and the previous owner of this body is relatively useless. The annual family competition is about to start. pills, burp. . .

"Fat man, let's go, don't talk while you go."

The two went out together.

"Brother Shang, when you say that you are not feeling well, don't play. Your father is the patriarch, and no one will embarrass you."

From my memory, I learned that the heavy metal block in my hand was called a "key", and it was an artifact in this world. Looking at the key floating next to You Xing, it was obvious that the body's useless firewood had not been activated.

This world is full of spiritual energy, and everyone can absorb the spiritual energy by running the mental method. Divided into ten grades. Intermediate-level engineers are rare in the entire continent, and senior-level engineers are legendary, and even more unheard of after this.

And his father is the strongest in the clan, reaching the third stage of practice, You Shang feels that he is going to defy the sky in this world, and the brilliant voice is coming.

His thoughts were interrupted, "Almost everyone in the family has activated the keys, and can issue spells that define variables, and some people can even type spells that call functions."

“没事,我昨晚突然顿悟了,从此以后必然一飞冲天,以后我罩着你,哈哈”,幽尚心情很高兴,拍了拍胖子的肩膀。

“尚哥,别吹了,键还没激活那,都能这么豪言壮语”

“简单,看着”

从记忆中已经得知,其实这键就像是上一世键盘加电脑的组合,里面类似Linux系统,输入的不过是灵力。

里面已经装好了JDK,幽尚只需要调用灵气勾勒出一个个的符合,打入键中。

vim .profile
复制代码

心神进入键内的一个文件空间中,接在将一个个的符号刻画进去:

export JAVA_HOME=/app/jdk1.8.0_51
export JRE_HOME=/app/jdk1.8.0_51/jre
export PATH=${JAVA_HOME}/bin:$PATH
复制代码

然后退出文件控件,接着刻入:

source .profile
复制代码

顿时,键上纹路全部亮起,发出夺目的光,离手而起,悬浮在了空中。

“卧槽,你真顿悟了?我当时耗费了一个多月才激活的,你这也太流畅了吧?瞬间就完事了?”胖子有些难以置信。

。。。

两人不多时来到了族内的试炼场,能看到不少人投来敌视的目光,幽尚懒的搭理他们,一会让他们知道什么叫做强者归来,一飞冲天。

比试的少年一共有几十人,一共三个擂台,最终决出前三,获得族内奖励。

很快,幽尚就上场了。试炼员宣布开始后,对面的少年便开始调用灵气,构建出一个个符号打入键中,速度那是。。。相当的慢。

幽尚觉得有些欺负人,等他差不多了,突然大喝一声:“键来”。

这一嗓子着实可能有些高了,对面的少年吓了一激灵,施法尽然被中断了,怒目而视:“卑鄙”。

台下和对方一伙的也开始叫嚣:“太卑鄙了”  “就是”  “从身旁唤到身前用得着喊吗”  “他是故意的” “卑鄙,尽然打断别人施法”

幽尚无语,只是想耍个帅而已。再给对方一个机会吧,然后又开始等待对方施法。漫长时间后,对方施法完成,一片璀璨的光芒袭来:

public class Main{
    public static void main(String[] args) {
        String str = "去死吧";
        System.out.println(str);
    }
}
复制代码

思想有多快,输入就有多快,幽尚瞬间创建好了文件空间Child.java,然后刻画好了符号:

class Parent{
    static {
        System.out.println("Parent静态代码块");
    }
    {
        System.out.println("Parent代码块");
    }
    public Parent(){
        System.out.println("Parent构造函数");
    }
}
public class Child extends Parent{
    static {
        System.out.println("Child静态代码块");
    }
    {
        System.out.println("Child代码块");
    }
    public Child(){
        System.out.println("Child构造函数");
    }

    public static void main(String[] args) {
        new Child();
    }
}
复制代码

接着:

javac Child.java
java Child
复制代码

 这些都在瞬间完成,幽尚大喝一声:“去”,一片更加夺目的光从幽尚的键中冲出,直接撞碎对方的术法,将期狠狠的打飞,跌落在擂台下。

“幽尚胜!”

“不错!”,幽尚的族长父亲幽战冲自己点了点头。

“给你机会了,可是你不中用啊”,幽尚一副欠揍的样子。

“太嚣张了”  “真想上去打他” “无耻”  台下一阵骚动

“尚哥,你这是什么术法呀,好繁奥啊,好牛逼啊”,下台后,胖子立刻上前。

这是我昨天刚顿悟的心法,我传给你,手指点在胖子眉心:

Java程序的初始化顺序,父类静态变量、父类静态代码块、子类静态变量、子类静态代码块、父类非静态变量、父类非静态代码块、父类构造函数、子类非静态变量、子类非静态代码块、子类构造函数。

“回去细心体会下,不难融会贯通”

“谢谢尚哥,尚哥牛逼”。


兄弟们,不要忘了点赞收藏关注,你的支持是我的动力!!!

おすすめ

転載: juejin.im/post/7078613730908438542