TIJ swot_JAVA的初学者(一)

原创 2004年09月15日 05:36:00




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


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.


TIJ swot_JAVA的初学者(五)

1.7 Object landscapes and lifetimesWell, mentioned something about C++C++ takes the approach that co...
  • Miracle04
  • Miracle04
  • 2004年09月16日 02:32
  • 778

TIJ swot_JAVA的初学者(四)

1.4 Reusing the implementationWe could reuse a class by instantiate it as an obect or place an objec...
  • Miracle04
  • Miracle04
  • 2004年09月16日 00:56
  • 855

TIJ swot_JAVA的初学者(三)

1.3 The hidden implementationAccess control enables users to solve their particular problems without...
  • Miracle04
  • Miracle04
  • 2004年09月15日 07:00
  • 716

TIJ swot_JAVA的初学者(二)

  • Miracle04
  • Miracle04
  • 2004年09月15日 06:28
  • 751

TIJ swot_JAVA的初学者(六)

1.8 Exception handling: dealing with errorsAn exception is an object thrown from the site of the err...
  • Miracle04
  • Miracle04
  • 2004年09月16日 04:27
  • 706


Thinking in Java 看了有几个月了,结果在第二遍看完了《控制程序流程》之后,程序才能按自己的意思运行。1、初始化问题:了解变量的初始化,初始化位置。                   ...
  • zhones
  • zhones
  • 2005年04月04日 10:37
  • 577

读TIJ -2 一切都是对象

《Thinking In Java·第2 章一切都是对象》
  • yqj2065
  • yqj2065
  • 2014年07月06日 04:22
  • 1104


心得暨TIJ笔记(原创)1.overridden(覆盖也叫覆写)规则  1).返回类型必须与所重写方法相同  2).不能比所重写方法访问性差  3).不能比所重写方法抛出更多异常2.finally唯一...
  • whoopee
  • whoopee
  • 2005年03月22日 19:24
  • 1103


body, td { font-family: 微软雅黑; font-size: 10pt; } ...
  • the_catcher
  • the_catcher
  • 2016年09月03日 23:57
  • 80

读TIJ -1 对象入门

《Thinking In Java·第 1 章对象入门》
  • yqj2065
  • yqj2065
  • 2014年07月06日 00:37
  • 1745
您举报文章:TIJ swot_JAVA的初学者(一)