Giter Site home page Giter Site logo

Comments (5)

flyaway921 avatar flyaway921 commented on August 28, 2024

对象的方法不是面向对象的,如果是完全面向对象,那么方法应该也是一个对象,而不仅仅是一个函数。

from android-discuss.

Vincentzc avatar Vincentzc commented on August 28, 2024

@flyaway921 应该不是这么理解吧。我觉得java中非面向对象的东西应该是指静态域和静态方法。

from android-discuss.

xingty avatar xingty commented on August 28, 2024

同意@Vincentzc
另外方法怎么不是面向对象的呢?一个对象基本组成是有属性和操作,而操作就是方法啊。

from android-discuss.

licheedev avatar licheedev commented on August 28, 2024

基本数据类型不属于面向对象,不过都有各自的包装类。

from android-discuss.

flyaway921 avatar flyaway921 commented on August 28, 2024

@Vincentzc 像python里面

def sayHi():
print "hi"

def exe(method):
method

if name == 'main':
exe(sayHi())

你看,这里我们把一个方法对象传给了另外一个方法并执行。而java中没法这么做

from android-discuss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.