`

Seaeast&collection——Object-oriented Programming(Java)_No.1

阅读更多
一切都是对象 : 
Alan kay曾经总结了第一个成功的面向对象语言、同时也是Java所基于的语言之一的Smalltalk的五个基本特性,这种特性表现了一种纯粹的面向对象程序设计方式:
    1.万物皆为对象。
    2.程序是对象的集合,他们通过发送消息来告知彼此所要做的。
    3.每个对象都有自己的由其他对象所构成的存储。
    4.每个对象都拥有其类型
    5.某一特定类型的所有对象都可以接受同样的消息。
存储:
    对象的存储方式:
    1.寄存器
    2.堆栈。位于通用RAM(随机访问存储器中)。
    3.堆。new将对象存储在“堆”里。
    4.常量存储
    5.非RAM存储
static关键词
    通过static关键字可以满足这两方面的需要。当生命一个事物是static时,就意味着这个域或方法不会与包含它的那个类的任何对象实例关联在一起。所以,即使从未创建某个类的任何对象,也可以调用其static方法或访问其static域。通常,你必须创建一个对象,并用它来访问数据或方法。因为非static域或方法必须知道他们一起运作的特定对象。
foreach语法
    Java SE5引入了一种新的更加简洁的for语法用于数组或容器。
    请注意,由于构造器的名称必须与类名完全相同。
Iterator迭代器
    1.使用方法iterator()要求容器返回一个Iterator。
    2.使用next()获得序列中的下一个元素
    3.使用hasNext()检查序列中是否还有元素
    4.使用remove()将迭代器新返回的元素删除

Next:正则表达式、容器、IO、并发等!

   
分享到:
评论

相关推荐

    Object-Oriented Software Construction 2nd

    5.4 OBJECT-ORIENTED SOFTWARE CONSTRUCTION 116 5.5 ISSUES 117 5.6 KEY CONCEPTS INTRODUCED IN THIS CHAPTER 119 5.7 BIBLIOGRAPHICAL NOTES 119 Chapter 6: Abstract data types 121 6.1 CRITERIA 122 6.2 ...

    Beginning Java 9 Fundamentals(Apress,2ed,2017)

    Learn the basics of Java 9, including basic programming concepts and the object-oriented fundamentals necessary at all levels of Java development. Author Kishori Sharan walks you through writing your ...

    Addison.Wesley.The.Java.Programming.Language.4th.Edition.Aug.2005.chm

    Programmers who are unfamiliar with object-oriented programming notions should read the quick tour, while programmers who are already familiar with object-oriented programming paradigms will find the...

    java.核心技术.第八版 卷1

    java 核心技术 第八版 core 卷1 Core Java, 8th Edition Core Java. Volume I. Fundamentals, 8th Edition Core Java. Volume II. Advanced Features, 8th Edition 官方网站 http://horstmann.com/corejava.html ...

    国外数据结构和算法合集书籍的种子

    Data Structures and Algorithms with Object-Oriented Design Patterns in Java - Bruno R. Preiss Data Structures and Algorithms with Object-Oriented Design Patterns in Python - Bruno R. Preiss Data ...

    Csharp.6.for.Programmers.6th.Edition

    You’ll enjoy the treatment of object-oriented programming and an object-oriented design/UML® ATM case study, including a complete C# implementation. When you’ve mastered the book, you’ll be ready...

    Java 9 for Programmers (Deitel Developer Series) 完整高清azw3版

    You’ll enjoy the Deitels’ classic treatment of object-oriented programming and the object-oriented design ATM case study, including a complete Java implementation. When you’re finished, you’ll ...

    The_CSharp_Programming_Language_Third_Edition

    The C# project started almost ten years ago, in December 1998, with the goal of creating a simple, modern, object-oriented, and type-safe programming language for the new and yet-to-be-named .NET ...

    Programming.C#4.0第六版.pdf

    C# supports object-oriented programming, and this chapter describes the language features dedicated to these techniques. Chapter 4, Extensibility and Polymorphism This chapter continues the discussion...

    Python数据结构与算法 英文版

    1.Introduction 2.Algorithm Analysis 3.Asymptotic Notation 4.Foundational Data Structures ...17.Python and Object-Oriented Programming 18.Class Hierarchy Diagrams 19.Character Codes 20.References

    Java软件解决方案,程序设计基础

    A text that really teaches a solid object-oriented approach must use what we call object-speak. That is, all processing should be discussed in object-oriented terms. That does not mean, however, that...

    Numerical Methods, Algorithms and Tools in C#

    The book focuses on standard numerical methods, novel object-oriented techniques, and the latest Microsoft .NET programming environment. It covers complex number functions, data sorting and searching ...

    Swift.OS.X.Programming.for.Absolute.Beginners.1484212347

    The basic principles of object-oriented programming without the complicated clutter of traditional programming language syntax How to use Xcode, the main programming tool used for both OS X and iOS ...

    C#语言规范 版本 4.0(English)

    C# (pronounced “See Sharp”) is a simple, modern, object-oriented, and type-safe programming language. C# has its roots in the C family of languages and will be immediately familiar to C, C++, and ...

    Learning Cocoa with Objective-C, 4th Edition

    From object-oriented programming to storing app data in iCloud, the fourth edition of this book covers everything you need to build apps for the iPhone, iPad, and Mac. You’ll learn how to work with ...

    Java.Interview.Bootcamp

    Object Oriented Programming Data Structures Exceptions JVM and Garbage Collection Threading Big O Notation Table of Contents Part 1: Soft Skills and Process 1 The Interview Process 2 Creating your ...

    Programming Microsoft LINQ in Microsoft.NET Framework 4

    Written for programmers with a background in C++, Java or other high-level, object-oriented languages, this book applies the Deitel signature live-code approach to teaching programming and explores ...

    Head First C# 英文版 7-1

    Head First C# is a complete learning experience for object-oriented programming, C#, and the Visual Studio IDE. Built for your brain, this book covers Visual C# 2008, Visual Studio 2008, and the .NET ...

Global site tag (gtag.js) - Google Analytics