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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • python抛出异常和捕获异常_python自定义异常

    python抛出异常和捕获异常_python自定义异常主动抛异常1.抛异常有时,程序需要主动抛出异常,因为某些情况下,你需要反馈消息给更上层的调用者,告诉它有一些异常情况发生,而你抛出异常的地方,没有能力处理它,因此需要向上抛出异常。这种情况为什么不让系统自己抛出异常呢?一个原因是上层的调用者本身就希望能够捕获有别于系统异常的自定义异常,二来,有些情况下,程序的逻辑是没有异常的,但是,从业务角度考虑,的确是一个不寻常的情况,因此需要我们主动抛出异常…

    2022年10月10日
    0
  • python实现矩阵转置的几种方法

    python实现矩阵转置的几种方法文章目录(1)方法一、使用numpy转置(2)方法二、使用zip()函数(3)方法三、使用python列表表达式【不占用额外空间,“原地修改”】(4)方法四、新建列表B,使用双重循环添加元素(1)方法一、使用numpy转置importnumpyasnpA=np.mat([[1,2,3],[4,5,6],[7,8,9]])print(A.T)print(A.swapaxes(0,1))#均输出#[[147]#[258]#[369]]importnum

    2022年6月2日
    48
  • C++增强for循环[通俗易懂]

    C++增强for循环[通俗易懂]for循环是常见的代码语句,常规的for循环如下#include<iostream>usingnamespacestd;intmain(){ intarray[]={1,1,2,3,5,8}; //常规for循环 for(inti=0;i<sizeof(array)/sizeof(array[0]);i++) { cout<<array[i]<<“”; } cou…

    2022年6月15日
    74
  • h3c bios密码_日本服务器ip端口密码

    h3c bios密码_日本服务器ip端口密码版本Ladon>=7.1139端口NetBIOSFileandPrintSharing通过这个端口进入的连接试图获得NetBIOS/SMB服务。这个协议被用于Windows”文件和打印机共享”和SAMBA。IPC$通信Windows系统中的netuseipc整个通信过程,先445−>137−>139验证,当你开启防火墙禁用445,发现系统命令就无法连接IPC了,根本没机会走到139,所以使用系统自带命令连接的ipc整个通信过程,先445->137->

    2022年10月9日
    0
  • Java面向对象三大特性学习总结

    Java面向对象三大特性学习总结面向对象的三大特性:封装、继承、多态将对象的属性和实现细节隐藏起来,不让外部程序直接进行访问,将属性私有化,仅对外公开接口,让外部程序通过类提供的方法来对隐藏信息进行访问和操作。好处是外部程序只能通过类规定的方法对数据进行访问,避免外界程序对类内部属性进行破坏。

    2022年7月25日
    6
  • dom4j 解析 xml

    dom4j 解析 xml

    2022年6月21日
    27

发表回复

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

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