JAVA英文文献_java毕业论文参考文献

JAVA英文文献_java毕业论文参考文献JAVA编程思想英文参考文献和翻译时间:2016-11-1514:44来源:毕业论文虽然java是基于C++基础上的,但是它更是纯粹的面向对象语“Ifwespokeadifferentlanguage,wewouldperceiveasomewhatdifferentworld.”3670LudwigWittgenstein(1889-1951)Althoughit…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

JAVA编程思想英文参考文献和翻译

时间:2016-11-15 14:44来源:毕业论文

虽然java是基于C++基础上的,但是它更是纯粹的面向对象语

“If we spoke a different language, we would perceive a somewhat different world.”3670

Ludwig Wittgenstein (1889-1951)

Although it is based on C++, Java is more of a “pure” object-oriented language.

Both C++ and Java are hybrid languages, but in Java the designers felt that the hybridization was not as important as it was in C++. A hybrid language allows multiple programming styles; the reason C++ is hybrid is to support backward compatibility with the C language. Because C++ is a superset of the C language, it includes many of that language’s undesirable features, which can make some aspects of C++ overly complicated.

The Java language assumes that you want to do only object-oriented programming. This means that before you can begin you must shift your mindset into an object-oriented world (unless it’s already there). The benefit of this initial effort is the ability to program in a language that is simpler to learn and to use than many other OOP languages. In this chapter you’ll see the basic components of a Java program and learn that (almost) everything in Java is an object.

You manipulate objects with references

Each programming language has its own means of manipulating elements in memory. Sometimes the programmer must be constantly aware of what type of manipulation is going on. Are you manipulating the element directly, or are you dealing with some kind of indirect representation (a pointer in C or C++) that must be treated with a special syntax?

All this is simplified in Java. You treat everything as an object, using a single consistent syntax. Although you treat everything as an object, the identifier you manipulate is actually a “reference” to an object.1 You might imagine a television (the object) and a remote control (the reference). As long as you’re holding this reference, you have a connection to the television, but when someone says, “Change the channel” or “Lower the volume,” what you’re manipulating is the reference, which in turn modifies the object. If you want to move around the room and still control the television, you take the remote/reference with you, not the television.

Also, the remote control can stand on its own, with no television. That is, just because you have a reference doesn’t mean there’s necessarily an object connected to it. So if you want to hold a word or sentence, you create a String reference:

String s;

But here you’ve created only the reference, not an object. If you decided to send a message to s at this point, you’ll get an error because s isn’t actually attached to anything (there’s no television). A safer practice, then, is always to initialize a reference when you create it:

String s = “asdf”;

However, this uses a special Java feature: Strings can be initialized with quoted text. Normally, you must use a more general type of initialization for objects.

You must create all the objects

When you create a reference, you want to connect it with a new object. You do so, in general, with the new operator. The keyword new says, “Make me a new one of these objects.” So in the preceding example, you can say:

String s = new String(“asdf”);

Not only does this mean “Make me a new String,” but it also gives information about how to make the String by supplying an initial character string.

Of course, Java comes with a plethora of ready-made types in addition to String. What’s more important is that you can create your own types. In fact, creating new types is the fundamental activity in Java programming, and it’s what you’ll be learning about in the rest of this book.

Where storage lives

It’s useful to visualize some aspects of how things are laid out while the program is running—in particular how memory is arranged. There are five different places to store data: JAVA编程思想英文参考文献和翻译:http://www.lwfree.com/fanyi/lunwen_71.html

——分隔线—————————-

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/187619.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • javascript_JavaScript走向成熟

    javascript_JavaScript走向成熟javascript明年JavaScript将有20年的历史(从首次在Netscape浏览器中首次亮相开始算起)。这是一门具有悠久历史的语言,并且从其早期开始就带来了很多负担,但是随着它离开少年时代的到来,我认为这是一种最终发展起来的语言。JavaScript通过允许脚本在浏览器中运行来彻底改变了Web。但是,在最初流行之后,它很快就开始受到不良声誉,并且经常与编写不良,剪切粘贴的代码…

    2022年7月13日
    18
  • Activity入门—Activity生命周期及三种状态+案例[通俗易懂]

    Activity入门—Activity生命周期及三种状态+案例[通俗易懂]生命周期就是一个对象从创建到销毁的过程,每个对象都有自己的生命周期。Activity生命周期分为三种状态。运行状态,停止状态,暂停状态。一.运行状态当activity在最前端时,它是可见的,有焦点的,可以用来处理用户的常见的操作。如:点击,双击,长按事件等。系统最不愿回收的就是出于此种状态的活动,这会带来非常差的用户体验。二.暂停状态activity依然可见,但它不再拥有焦点,即用户对它的操

    2022年8月16日
    5
  • 使用idea打war包[通俗易懂]

    使用idea打war包[通俗易懂]1.将整个maven工程先下载一下2.在子工程下选择package3.去工作空间找到自己的项目然后进入target就可以看到war包。4.可以使用压缩软件打开看看打包是否正确。…

    2025年7月16日
    10
  • vim中保存退出_文档没保存就关了怎么恢复

    vim中保存退出_文档没保存就关了怎么恢复保存命令按ESC键跳到命令模式,然后::w保存文件但不退出vi:wfile将修改另外保存到file中,不退出vi:w!强制保存,不推出vi:wq保存文件并退出vi:wq!强制保存文件,并退出viq:不保存文件,退出vi:q!不保存文件,强制退出vi:e!放弃所有修改,从上次保存文件开始再编辑

    2022年8月24日
    13
  • phpstorm mac激活码[在线序列号]

    phpstorm mac激活码[在线序列号],https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月19日
    84
  • 怎么新建pytest的ini文件_python读取配置文件

    怎么新建pytest的ini文件_python读取配置文件前言pytest配置文件可以改变pytest的运行方式,它是一个固定的文件pytest.ini文件,读取配置信息,按指定的方式去运行查看pytest.ini的配置选项pytest-h找到以下

    2022年7月28日
    23

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号