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

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

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • 博客大巴,自动登录,并发布信息开发小计。

    博客大巴,自动登录,并发布信息开发小计。工具准备:Fiddler相关网页:登录页面:http://passport.blogbus.com/login信息发布信息:http://www.blogbus.com/user/?blogid=49

  • NBNS扫描工具nbtscan-unixwiz

    NBNS扫描工具nbtscan-unixwizNBNS扫描工具nbtscan-unixwizNBNS是NetBIOSNameService的缩写,表示NetBIOS名称解析服务。NETBIOS是一种网络协议,用于实现消息通信和资源共享。利用该服务,可以基于NETBIOS协议获取计算机名称,从而进一步判断共享资源。KaliLinux提供了专用工具nbtscan-unixwiz。它可以直接扫描单个或者多个计算机名称或者IP地址,然后搜索…

    2022年10月21日
  • app的测试点_测试皮肤的软件叫什么

    app的测试点_测试皮肤的软件叫什么APP测试有很多方面需要考虑到,我列几点有明显特征的:功能测试:手机软件的基本功能。倒不一定完全由测试人员来完全执行,但却是所有测试中最重要的,需要测试人员做很好的测试策略和职责划分。稳定性测试:大多数手机应用是需要保证能够稳定运行一定时间的(尤其是对于一些记事类应用),而且在应用的运行状态发生切换后需要继续保持当前的状态,不出现闪退。性能测试:这部分分为两个方面,一部分是后台服务的性

  • Python静态代码检查工具Flake8

    Python静态代码检查工具Flake8flake8

  • spdlog使用

    spdlog使用目录Spdlog优点Example简单封装与使用使用中遇到的问题Spdlog优点只需包含头文件 无需依赖第三方库 支持跨平台 支持多线程 源码地址:https://github.com/gabime/spdlog Example////Copyright(c)2015GabiMelman.//DistributedundertheMITLicense(http://opensource.org/licenses/MIT)/.

  • 源码剖析signal和sigaction的区别[通俗易懂]

    源码剖析signal和sigaction的区别[通俗易懂]这两个函数都是Linux下注册信号处理函数有关,但是它们的区别一般我们都是从书上、网上、man手册得知,要想对它们的区别了然于胸,源码剖析才是彻底的方法。先来看这两个函数的区别和实验:1、signal比sigaction简单,但signal注册的信号在sa_handler被调用之前把会把信号的sa_handler指针恢复,而sigaction注册的信号在处理信号时不会恢复sa_handle

发表回复

您的电子邮箱地址不会被公开。

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