TIJ swot_JAVA的初学者(一)

我只是个JAVA的初学者找了本英文书来看。这里主要是一些摘要,帮助自己记忆理解,放到BLOG里只是为了督促自己坚持下去。

对于觉得不相干的朋友表示道歉:)

如果大家有更好的学习方法,请赐教!非常感谢:)

Struggling with JAVA for a while now, still haven't got the big picture of concepts. Although stuffed with all the words, like polymorphism, inheritance, inner class, abstract, etc. I feel bogged down everytime I?try to use?them in my program. This makes me feel so frustrated. I heard people talk about TIJ, it is like a philosophy book in JAVA. Hopefully, I will get everything I need from it.

Chapter 1

1.1

All programming languages provide abbstractions.

?Assembly language is a small abstraction of the underlying machine.?Many so-called?"imperative" language(Fortran, BASIC, and C) were abstractions of assembly language. The primary abstraction of these languages require you to think in terms of the structure of the computer rather than the structure of the problem you are trying to solve.The programmer must establish the association between the "solution space" and the "problem space".

The altrenative to? modeling the machine is to model the problem you're trying to solve. Early languages such as LISP and APL chose particular views of the world. PROLOG casts all problems into chins of decisions. Each of these approaches is a good solution to the?particular class of problem they're designed to solve, but when you step outside that domain they become awkward.

The Object-Oriented approach provides the programmer tools to represent elements in the problem space, thus the approach is not constrained to any particular type of problem. We refer to the elements in the problem and their representations in the solution space as "objects".For those objects, which has no problem-space analogs, the porgram is allowed to adapt itself to the lingo of the problem by adding new types of objects. Thus, OOP allows us to describe the problem in terms of problem, rather than in terms of the computer where the solution will run.

Some designer advocate the combination of various approaches into multiparadigm programming language.

Alan Kay summarized five basic characteristics of SmallTalk, the first successful object-oriented language and one of the languages upon which Java is based.

1. Everything is an object.A class is an object, an integer is an object...everything is an object.

2. A program is a bunch of objects telling each other what to do by sending messages. No matter inherit or extend, or simply?instantiate another object/class, all the work is about the interraction of objects.

3.Each object has its own memory made up of other objects. "create a new object by making a package containing existing objects." To build a complex program while hiding it behind the simplicity of objects. Does this mean inheritence?Probably not.

4.Every object has a type.

5.All objects of a particular type can receive the same messages.

?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值