ikkhksvu 发表于 2024-8-17 11:25:50

Java是什么?Java到底能干嘛?


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">作者:ithuangqing</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">源自</span>:编码之外</p>链接:https://url.cn/5xB3DYe
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">我刚<span style="color: black;">起始</span>学习Java的时候,很长一段时间都有这么个疑惑?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java到底是啥?它能干什么?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">自己<span style="color: black;">亦</span>看过不少的课程和书,大部分都是从Java的发展史<span style="color: black;">起始</span>讲,总之<span style="color: black;">便是</span><span style="color: black;">哪些</span>什么Java历史悠久,Java很优秀,Java越来越牛,用的人越来越多,什么编程语言排行榜常年<span style="color: black;">第1</span>,大致都是这些,<span style="color: black;">而后</span>再扯些其他的,接着就上起了Hello World!就<span style="color: black;">这般</span>,你Java生涯的<span style="color: black;">第1</span>个代码<span style="color: black;">起始</span>了,意思是“你好,世界!”</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">我还是想不通,Java是啥,能干嘛,能<span style="color: black;">不可</span>先告诉我?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">可能你在刚<span style="color: black;">起始</span>学习Java的时候<span style="color: black;">亦</span>有<span style="color: black;">这般</span>的疑惑,<span style="color: black;">那样</span>你会怎么做呢?你不<span style="color: black;">晓得</span>啊,怎么办?问别人?不,你应该会想到百度,不是说</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">百度一下,你就<span style="color: black;">晓得</span>吗?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">好嘞,<span style="color: black;">咱们</span>上百度<span style="color: black;">瞧瞧</span>去:</p>

    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/39a3ffd5be254976a61f9563128c3a08~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=GkpiLDHjc6VnGhW8On3EZk6JQWs%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">看到<span style="color: black;">第1</span>个是百度百科对Java的介绍,点开<span style="color: black;">瞧瞧</span>吧,百度百科是<span style="color: black;">这般</span>介绍Java的:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java是一门面向对象编程语言,不仅吸收了C语言的<span style="color: black;">各样</span>优点,还摒弃了C里难以理解的多继承、指针等概念,<span style="color: black;">因此呢</span>Java语言<span style="color: black;">拥有</span>功能强大和简单易用两个特征。Java语言<span style="color: black;">做为</span>静态面向对象编程语言的<span style="color: black;">表率</span>,极好地实现了面向对象理论,<span style="color: black;">准许</span>程序员以优雅的思维方式进行<span style="color: black;">繁杂</span>的编程 。Java<span style="color: black;">拥有</span>简单性、面向对象、分布式、健壮性、安全性、平台独立与可移植性、多线程、动态性等特点 。Java<span style="color: black;">能够</span>编写桌面应用程序、Web应用程序、分布式系统和嵌入式系统应用程序等 。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">大眼一看,说的真好,<span style="color: black;">不外</span>总觉得有点官方啊,继续搜索其他的<span style="color: black;">文案</span>,<span style="color: black;">瞧瞧</span>别人怎么介绍Java的,随便点开一篇<span style="color: black;">文案</span>,看,这位博主<span style="color: black;">这般</span>说:</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java是一种<span style="color: black;">能够</span>撰写跨平台应用程序的、面向对象的程序设计语言。简单说,Java<span style="color: black;">便是</span>一种语言,<span style="color: black;">不外</span>是一种针对jvm的语言,Java编译后是字节码,而jvm会把这些字节码解释成<span style="color: black;">设备</span>码,<span style="color: black;">而后</span>做出相应的动作。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">百度百科那个说到了C和C++,还有什么面向对象,分布式,还有什么静态面向对象编程,觉得有点不懂,看这位博主写的,貌似懂了<span style="color: black;">有些</span>,<span style="color: black;">不外</span>啥是jvm啊?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你<span style="color: black;">瞧瞧</span>,刚<span style="color: black;">起始</span>学习个Java,没想到什么是Java都弄不清楚,有点小失落!</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">庆哥说:<span style="color: black;">非常多</span>人刚<span style="color: black;">起始</span>学习Java的时候其实并不会<span style="color: black;">这般</span>仔细的去<span style="color: black;">科研</span>到底什么是Java,大部分都是百度搜一下看一下什么是Java,<span style="color: black;">或</span>看书看视频,听别人大致讲一下什么是Java就过去了,结果<span style="color: black;">便是</span><span style="color: black;">忽然</span>有人问你什么是Java,你貌似不<span style="color: black;">晓得</span>怎么说,大致能想起来,嗯,是个编程语言。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">那样</span>怎么去理解Java,该怎么说呢?要的是那种从来<span style="color: black;">无</span>接触过编程的人<span style="color: black;">亦</span>能一听就<span style="color: black;">晓得</span>Java是什么了?有吗?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">那<span style="color: black;">必要</span>有啊,那啥是Java嘞?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>嘞,你先记住,Java是语言,啥是语言?汉语,英语,法语和德语,布拉布拉,就这些,对,Java<span style="color: black;">亦</span>是一门语言,有啥<span style="color: black;">区别</span>嘞,像汉语,针对的是<span style="color: black;">咱们</span>人,<span style="color: black;">咱们</span>中国人大部分都是<span style="color: black;">运用</span>汉语来进行沟通,Java<span style="color: black;">亦</span>是语言,<span style="color: black;">不外</span><span style="color: black;">咱们</span>人<span style="color: black;">不消</span>Java语言沟通,那Java是谁的沟通语言?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java是计算机和<span style="color: black;">咱们</span>的沟通语言,计算机<span style="color: black;">能够</span>懂Java这门语言。当然,你学会了Java,你<span style="color: black;">亦</span>会这门语言,你就<span style="color: black;">能够</span>和计算机沟通啦!</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">例如</span>说,你对你女<span style="color: black;">伴侣</span>说“给我倒洗脚水去!”,<span style="color: black;">而后</span>你女<span style="color: black;">伴侣</span>听到了这句话,<span style="color: black;">晓得</span>自己该干嘛了,就去给你倒洗脚水了(现实中大部分不是<span style="color: black;">这般</span>,哈哈)。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">那样</span>你要是和计算机沟通,想让计算机给<span style="color: black;">咱们</span>做一件事情,总<span style="color: black;">不可</span>说“喂,计算机,给我倒洗脚水去”,这个计算机还真听不懂,那咋办?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">当然是得<span style="color: black;">运用</span>计算机能够明白的语言与它沟通啦!那是啥,Java<span style="color: black;">便是</span>啊,你<span style="color: black;">运用</span>Java是<span style="color: black;">能够</span>和计算机沟通的,当然<span style="color: black;">这儿</span>的沟通是类比<span style="color: black;">咱们</span>人与人之间的说法,其实<span style="color: black;">针对</span>计算机而言,准确的应该是<span style="color: black;">咱们</span>给计算机下达指令,计算机收到<span style="color: black;">咱们</span>的指令去做相应的事情。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">怎么样,大致有个印象吧!啥是Java,明白<span style="color: black;">那样</span>一丢丢了吧!</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java是一门语言,记住了吧,这个语言是用于计算机的,<span style="color: black;">咱们</span><span style="color: black;">运用</span>Java<span style="color: black;">能够</span>和计算机进行交流,<span style="color: black;">咱们</span>写一段Java代码,计算机就<span style="color: black;">晓得</span><span style="color: black;">咱们</span>想干啥,当然前提是你写的是正常的代码,<span style="color: black;">因此</span>Java<span style="color: black;">能够</span>叫做计算机语言。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">可能有人又不明白了,啥是计算机语言,这个?不<span style="color: black;">便是</span>计算机之间的语言嘛,<span style="color: black;">咱们</span><span style="color: black;">瞧瞧</span>百科怎么介绍计算机语言的:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">计算机语言(computer language)指用于人与计算机之间通讯的语言,是人与计算机之间传递信息的介质。<span style="color: black;">然则</span>其概念比通用的编程语言要更广泛。例如,HTML是置标语言,<span style="color: black;">亦</span>是计算机语言,但并不是编程语言。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">看到<span style="color: black;">这儿</span><span style="color: black;">咱们</span>又要肯定一个概念,啥嘞?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java是一门计算机语言,<span style="color: black;">能够</span>用于<span style="color: black;">咱们</span>与计算机之间的沟通,<span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">运用</span>Java语言给计算机下达指令。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">好,<span style="color: black;">咱们</span>继续,<span style="color: black;">咱们</span>看上面说到了编程语言,那啥又是编程语言,和计算机语言有什么区别呢?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>你要<span style="color: black;">晓得</span>,你学习Java,以后你就<span style="color: black;">能够</span>说自己是程序员,码农,敲代码的,干编程的!</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你看,<span style="color: black;">咱们</span>又说到了编程,咱先<span style="color: black;">来讲</span>说编程语言吧,上面<span style="color: black;">咱们</span>说到,Java是一门计算机语言,那是不是编程语言呢?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">必要</span>的啊,Java铁定是编程语言啊,<span style="color: black;">这儿</span>要记住:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">计算机语言<span style="color: black;">包含</span>的<span style="color: black;">更加多</span>,它<span style="color: black;">包含</span>了编程语言,除此之外,计算机语言还<span style="color: black;">包含</span>置标语言,建模语言,你可能又糊涂了,这都是啥啊?其实吧,我<span style="color: black;">亦</span>不<span style="color: black;">晓得</span>,<span style="color: black;">因此</span>,别管了,你只要记住,计算机语言<span style="color: black;">包含</span>编程语言,Java是一门计算机语言,<span style="color: black;">亦</span>是一门编程语言。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">到了<span style="color: black;">这儿</span>,急<span style="color: black;">必须</span>和<span style="color: black;">大众</span>解释一下,什么是编程语言,百科对他是<span style="color: black;">这般</span>说的:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">用来定义计算机程序的形式语言。它是一种被标准化的交流技巧,用来向计算机发出指令。一种计算机语言让程序员能够准确地定义计算机所<span style="color: black;">必须</span><span style="color: black;">运用</span>的数据,并精确地定义在<span style="color: black;">区别</span><span style="color: black;">状况</span>下所应当采取的行动。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">简单点,大白话一点:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">能够</span>写程序,<span style="color: black;">亦</span><span style="color: black;">便是</span><span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">运用</span>它来让计算机干活</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">没忘记吧,Java<span style="color: black;">便是</span>一门编程语言啊,当然,编程语言那可有不少嘞,就像各个国家都有自己<span style="color: black;">区别</span>的语言,编程语言<span style="color: black;">亦</span>是有<span style="color: black;">非常多</span><span style="color: black;">归类</span>的,来来,看张图吧:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p9-sign.toutiaoimg.com/pgc-image/ee3b714e49704efcaa28d09d04ce33ab~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=G6GVS8ge44C8FdP0HMBIlAivEY0%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你<span style="color: black;">瞧瞧</span>,是不是<span style="color: black;">非常多</span>啊,<span style="color: black;">不外</span><span style="color: black;">不消</span>管它,<span style="color: black;">咱们</span>的重点是Java。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">说到了<span style="color: black;">这儿</span>,<span style="color: black;">咱们</span>大致<span style="color: black;">晓得</span>了Java是个啥,<span style="color: black;">那样</span>这个Java怎么用啊?能<span style="color: black;">不可</span>举个例子啊,好,接下来,<span style="color: black;">咱们</span>就让<span style="color: black;">咱们</span>的计算机给<span style="color: black;">咱们</span>倒洗脚水,走起。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">对了,你起码应该<span style="color: black;">晓得</span>Java编程语言,是<span style="color: black;">必须</span>你写的吧,<span style="color: black;">亦</span><span style="color: black;">便是</span><span style="color: black;">必须</span>你敲代码的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">庆哥说:啥是代码啊,代是<span style="color: black;">表率</span>的意思,码嘞,这可不是<span style="color: black;">咱们</span>骑得那玩意,<span style="color: black;">这儿</span>指的是二进制编码,<span style="color: black;">因此</span>代码<span style="color: black;">便是</span>“<span style="color: black;">表率</span>二进制编码的东西”,这<span style="color: black;">一起</span>,后面<span style="color: black;">亦</span>会<span style="color: black;">仔细</span>介绍,不着急。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下面<span style="color: black;">咱们</span><span style="color: black;">起始</span>敲代码吧,打开你的记事本,<span style="color: black;">而后</span>写上这些:</p>public class Hello{ public static void main(String[] args){ System.out.println("hello,给我倒洗脚水去"); }}<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">对了,你<span style="color: black;">晓得</span>上面这是干嘛不,<span style="color: black;">咱们</span>在给计算机发指令嘞,<span style="color: black;">亦</span><span style="color: black;">便是</span>让它给咱干活,写好之后<span style="color: black;">保留</span>这个文件,对了,文件的格式要改成以“java”结尾的哦,文件名<span style="color: black;">叫作</span>要叫Hello,<span style="color: black;">亦</span><span style="color: black;">便是</span>“Hello.java”</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">看,<span style="color: black;">便是</span>它:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/fb1f9a6d7cbe4693bd8f865ac9f2bda7~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=id%2BEPIfevbR1aiwLNRqYsoKcFLU%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span><span style="color: black;">咱们</span>打开<span style="color: black;">咱们</span>电脑上的cmd命令行,关于cmd有多种打开方式,<span style="color: black;">一般</span>的一种是按下“win+r”会<span style="color: black;">显现</span>这个:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/bb9f7151f43f410882861dadf3fa56f4~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=0EDcYYU41umRKvy%2FNL%2F7SWU46%2F0%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在里面输入cmd,<span style="color: black;">而后</span>确定,就会<span style="color: black;">显现</span>“黑窗口”,<span style="color: black;">亦</span><span style="color: black;">便是</span>dos命令窗口。<span style="color: black;">亦</span><span style="color: black;">便是</span><span style="color: black;">此刻</span>这个样子:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/236d044dd3bf42d9b9e1f1d6eeeb14da~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=HAWQy5SavENxdL4cbFeu%2B0o%2BuK4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">可能有人说,不<span style="color: black;">同样</span>啊,我的<span style="color: black;">无</span>那个cd,我<span style="color: black;">亦</span>是刚打上的,<span style="color: black;">因此</span>,你<span style="color: black;">亦</span>敲上个cd吧,可能有人<span style="color: black;">晓得</span>这是干嘛的,接下来<span style="color: black;">咱们</span>把刚才创建的“Hello.java”直接拖拽到这个黑窗口,就<span style="color: black;">成为了</span><span style="color: black;">这般</span>:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/221321017abd4ee09a39e8eb4439cfc8~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=4OiD0WwOPIffmKxpN%2BXErcuj0VE%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span><span style="color: black;">重视</span>要把后面的“\Hello.java”删除掉,<span style="color: black;">而后</span>按一下回车键,<span style="color: black;">亦</span><span style="color: black;">便是</span>“Enter”,就<span style="color: black;">显现</span>了这个:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/01fb00f54473493fbe56327e4cf722a6~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=Axw6l8201RSHMzoHNP813XYZZNE%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ps:到<span style="color: black;">这儿</span>可能有人会出错了,<span style="color: black;">咱们</span>初学编程的时候总会遇到<span style="color: black;">各样</span>各样的奇葩问题,<span style="color: black;">非常多</span>人迷茫的不要不要的,说我明明照着做的,为啥<span style="color: black;">便是</span>不行,初学者<span style="color: black;">显现</span><span style="color: black;">这般</span>的问题,大部分都是自己的马虎<span style="color: black;">导致</span>的,非说自己的<span style="color: black;">同样</span>,到最后,不是字母写错,<span style="color: black;">便是</span>忘了空格,还有个重要的是标点符号不是英文状态下的,<span style="color: black;">倘若</span>你<span style="color: black;">这儿</span><span style="color: black;">显现</span>错误了,<span style="color: black;">瞧瞧</span>,有<span style="color: black;">无</span><span style="color: black;">显现</span>我说的错误。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">接下来,<span style="color: black;">咱们</span>继续输入:</p>javac Hello.java<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>回车,这一回车<span style="color: black;">没关系</span>,那是会产生一个新物种的:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/f39bd46c18fc4264a48f8d391cf9c2ef~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=6gDKwjp6P1ho68us2Nma%2Bd2ZNv4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">显现</span>了啥新物种呢?你<span style="color: black;">瞧瞧</span>,<span style="color: black;">便是</span>它:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/2e6fb9f59e924a379f8653b14a695e03~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=u3sw1zjlFBq6bHv4NKbaKGgECxQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这个是Java的字节码文件,<span style="color: black;">亦</span>叫做class文件,<span style="color: black;">由于</span>命名是以class结尾的,这个你不懂<span style="color: black;">不碍事</span>,<span style="color: black;">咱们</span>接着往下做:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/373afb420c4841ff970e99f8ffa6b96a~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=XAW0ntz5HYjK4Bhk7p%2BfCdh0UNk%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">看到没,<span style="color: black;">咱们</span>又输入了以下命令:</p>java Hello<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span><span style="color: black;">咱们</span>看到有个输出:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Hello,给我倒洗脚水去</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ps:<span style="color: black;">倘若</span>你在跟着我的操作在你的电脑上操作的话,可能你在输入javac那一步就出错了,那是<span style="color: black;">由于</span>你缺少java运行环境,这个<span style="color: black;">咱们</span>后面会<span style="color: black;">仔细</span>介绍,你<span style="color: black;">能够</span>先看我操作的结果。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">有人说,这是啥,有点疑惑啊,我之前不是说了嘛,<span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">运用</span>java语言来给计算机下达指令,让计算机给<span style="color: black;">咱们</span>干活,对了,你不会真以为计算机会给咱们倒洗脚水吧。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>再来<span style="color: black;">瞧瞧</span>这段代码:</p>public class Hello{ public static void main(String[] args){ System.out.println("hello,给我倒洗脚水去"); }}<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这<span style="color: black;">便是</span>一段最简单的java代码,至于为啥<span style="color: black;">这般</span>写,你先<span style="color: black;">不消</span>管,<span style="color: black;">咱们</span>不是说<span style="color: black;">能够</span>用java给计算机下达指令嘛?指令在哪?</p>System.out.println("hello,给我倒洗脚水去");<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这其实<span style="color: black;">便是</span><span style="color: black;">咱们</span>给计算机下达的一个指令,意思是让计算机在屏幕上打印这一句话:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">hello,给我倒洗脚水去</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>看刚才的输出,是不是<span style="color: black;">便是</span>打印出了这句话:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/fe3333cec5bd48a8bb47f5ee23cae6f6~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=km%2BTnSxmwEQ4d0n9MIdSjidj9zg%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你看,计算机是不是<span style="color: black;">根据</span><span style="color: black;">咱们</span>给的Java指令做出了相应的动作,当然,这是最基本的,最简单的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">到<span style="color: black;">这儿</span>,我相信,你大致懂了什么是Java了,<span style="color: black;">不外</span>接下来还有一个大问题,那<span style="color: black;">便是</span>Java能干嘛啊?</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">上面<span style="color: black;">咱们</span>给出了一个简单的例子,就<span style="color: black;">那样</span>一丢丢代码,<span style="color: black;">不外</span>还<span style="color: black;">能够</span>有很<span style="color: black;">繁杂</span>的,代码超级多的,<span style="color: black;">这般</span>就会产生一个有<span style="color: black;">非常多</span>功能的东西,<span style="color: black;">例如</span><span style="color: black;">咱们</span><span style="color: black;">能够</span>用Java写一个计算器,啥计算器,就类似你电脑上自带的计算器那样,再<span style="color: black;">例如</span><span style="color: black;">咱们</span>常用的qq吧,<span style="color: black;">咱们</span><span style="color: black;">亦</span><span style="color: black;">能够</span>用Java写一个,当然,越<span style="color: black;">繁杂</span>的应用,写起来难度越大,<span style="color: black;">咱们</span>还<span style="color: black;">能够</span><span style="color: black;">运用</span>Java做出来一个网站,你想在网站上展示啥都行。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">不外</span>嘞,Java可能写系统<span style="color: black;">更加多</span><span style="color: black;">有些</span>,<span style="color: black;">便是</span><span style="color: black;">各样</span>各样的后台,啥是后台,<span style="color: black;">例如</span>你进入淘宝买东西吧,你登陆自己的账户和名<span style="color: black;">叫作</span>,<span style="color: black;">而后</span>进入首页,<span style="color: black;">而后</span>搜索“好吃的”,<span style="color: black;">而后</span>就会出来一大堆好吃的。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为啥你输入自己的账户和名<span style="color: black;">叫作</span>就能进去网站,那是<span style="color: black;">由于</span>用Java代码写了一个<span style="color: black;">规律</span>,<span style="color: black;">例如</span>说,你的名字是1,<span style="color: black;">秘码</span>是2,当你点击登录按钮的时候,Java代码中就会做判断,<span style="color: black;">倘若</span>名字是1<span style="color: black;">况且</span><span style="color: black;">秘码</span>是2,那就让你登进去,否则就进不去,这都是Java代码的功劳。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">当你选中一个好吃的,<span style="color: black;">而后</span>下单,填写<span style="color: black;">位置</span>,<span style="color: black;">而后</span>你就愉快的购物完<span style="color: black;">成为了</span>,接下来商家<span style="color: black;">必须</span>给你发货啊,于是商家就会登上一个网站,在这个里面<span style="color: black;">能够</span>看到你叫啥,买的啥,<span style="color: black;">位置</span>在哪,<span style="color: black;">而后</span>就给你发货了,商家登入的这个网站就<span style="color: black;">能够</span>叫做后台。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">懂了嘛,Java就<span style="color: black;">能够</span>完成<span style="color: black;">这般</span>的一个网站。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">学到后面你就会<span style="color: black;">发掘</span>,语言<span style="color: black;">便是</span>工具,能做的事情有<span style="color: black;">非常多</span>,不局限于网站啊,桌面应用啥的!</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">说了这些,你<span style="color: black;">亦</span>能大致<span style="color: black;">晓得</span>Java能做些啥了,其实我<span style="color: black;">晓得</span>你<span style="color: black;">认识</span>的还是有点模糊,那下面咱再说说。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Java其实有三个版本<span style="color: black;">归类</span>:</p>JavaSEJavaMEJavaEE<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你<span style="color: black;">能够</span>大致的<span style="color: black;">这般</span>理解,JavaSE是Java的核心<span style="color: black;">基本</span>,<span style="color: black;">包括</span>的<span style="color: black;">便是</span><span style="color: black;">基本</span>知识,自学Java刚<span style="color: black;">起始</span>都是从这个<span style="color: black;">起始</span>的,JavaME呢?不<span style="color: black;">晓得</span>大家之前玩过那种游戏没,<span style="color: black;">便是</span>在安卓手机还<span style="color: black;">无</span>的时候,<span style="color: black;">咱们</span>会下载<span style="color: black;">有些</span>jar结尾的游戏文件来安装,打开之后都会先有这个图标:</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/79ac007d1fe54d4a8cbfd22743fea121~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723890571&amp;x-signature=wcQcAXzcpOan3of5wq0XfyN0PYE%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你<span style="color: black;">能够</span>简单理解这<span style="color: black;">便是</span>JavaME搞出来的,<span style="color: black;">不外</span>后来出来了安卓,就代替了它,<span style="color: black;">因此</span><span style="color: black;">不消</span>太管它,至于JavaEE,<span style="color: black;">能够</span><span style="color: black;">叫作</span>为企业级应用<span style="color: black;">研发</span>,这部分会学<span style="color: black;">各样</span>框架,<span style="color: black;">各样</span>高级玩意儿,<span style="color: black;">亦</span>是<span style="color: black;">咱们</span>后期主要学习的东西,<span style="color: black;">咱们</span><span style="color: black;">能够</span>利用这部分知识<span style="color: black;">研发</span><span style="color: black;">各样</span>网站啊,桌面应用啊,<span style="color: black;">有些</span>工具啊,<span style="color: black;">乃至</span>游戏都<span style="color: black;">能够</span>,当然,<span style="color: black;">非常多</span>应用都是<span style="color: black;">运用</span>到了java的综合技术来实现的。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">此刻</span><span style="color: black;">非常多</span>学习编程的人,刚<span style="color: black;">起始</span>会疑惑不<span style="color: black;">晓得</span>学哪门编程语言,其实吧“铁打的思想,流水的语言”,语言终归是工具,怎么用,能干嘛,这取决于用的人,<span style="color: black;">倘若</span>你足够牛,那么你<span style="color: black;">能够</span>:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">用java改变世界!</p>




听听海 发表于 2024-8-21 17:57:43

论坛的成果是显著的,但我们不能因为成绩而沾沾自喜。
页: [1]
查看完整版本: Java是什么?Java到底能干嘛?