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

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


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

相关推荐

  • 请简述Map-Reduce算法的原理(通俗易什么成语)

    下面是我自己的微信公众号(不定期更新JAVA、大数据、个人成长等干货)1、公众号上有经典的技术电子书可以免费领2、大家有问题可以在公众号问我,只要你问了我就会回复(相互交流)也可以扫描下面二维码,加我个人微信,和我直接沟通Hadoop简介Hadoop就是一个实现了Google云计算系统的开源系统,包括并行计算模型Map/Reduce,分布式文件系统HDFS,以及…

    2022年4月13日
  • SpringMVC工作原理(比较详细哦)「建议收藏」

    SpringMVC工作原理(比较详细哦)「建议收藏」1.用户发送请求至前端控制器DispatcherServlet(也叫中央处理器).2.DispatcherServlet收到请求调用HandlerMappering处理器映射器3.处理器映射器找到具体的处理器(可以根据xml配置、注解进行查找),生成处理器对象及处理器拦截器(如果有则生成)一并返回给DispatcherServlet.4.DispatcherServlet调用Handler…

    2022年5月15日
  • java全局变量和局部变量的区别「建议收藏」

    java全局变量和局部变量的区别「建议收藏」java全局变量和局部变量全局变量全局变量又称实例变量,属性,成员变量。位置定义在类中,属于类中的一个成员作用范围因为全局变量是定义在类中的,所以可以使用四种访问权限控制修饰符修饰,但是不论使用哪种,全局变量在当前类中的每一个方法中都可以被访问到,(static修饰的静态方法只能访问static修饰的属性)默认值全局变量有默认值基本类型的实例变量:整型 :默认值为0浮点型 :默认值为0.0布尔型 :默认值为false字符型 :默认值为0或者‘\u0000’引用类型的实

    2022年8月21日
  • MATLAB GUI界面编程——一些细节问题「建议收藏」

    MATLAB GUI界面编程——一些细节问题「建议收藏」写在前面的话:本篇博文主要对自己在进行MATLABGUI设计时遇到的一些细节问题进行总结,点击下面目录中的相关问题,可以直接跳转至相应位置。另外,需要声明的是,我所使用的MATLAB版本——MATLAB R2017a。目录一、使用MATLAB的GUIDE开发环境,来快速创建GUI界面二、修改MATLABGUI的.fig和.m文件名三、修改MATLABGUI界面的名字四…

    2022年6月14日
  • eclipse导入maven工程报错解决方法记录「建议收藏」

    eclipse导入maven工程报错解决方法记录「建议收藏」http://www.cnblogs.com/hongwz/p/5456578.html

    2022年5月6日
  • Adaboost 算法的原理与推导[通俗易懂]

    Adaboost 算法的原理与推导[通俗易懂]Adaboost算法的原理与推导0引言一直想写Adaboost来着,但迟迟未能动笔。其算法思想虽然简单:听取多人意见,最后综合决策,但一般书上对其算法的流程描述实在是过于晦涩。昨日11月1日下午,在我组织的机器学习班第8次课上讲决策树与Adaboost,其中,Adaboost讲得酣畅淋漓,讲完后,我知道,可以写本篇博客了。无心啰嗦,本…

    2022年6月5日

发表回复

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

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