JavaFX 基础学习二

基本的变量类型 如下: 

 

Type

Declaration

Default Value

Element Specifier

Cardinality

Literal or Creation Examples

String

: String

""

java.lang.String

1 Required

"Brownian"

Integer

: Integer

0

java.lang.Integer

1 Required

1956

Number

: Number

0.0

java.lang.Double

1 Required

1.4142

Boolean

: Boolean

false

java.lang.Boolean

1 Required

true

Duration

: Duration

0ms

javafx.lang.Duration

1 Required

47s

Object

: Object

null

java.lang.Object

0-1 Optional

new Object

other class types

: ClassName

null

ClassName

0-1 Optional

Point {x: 3 y: 9}

function types

: function(name : ParamType, ...) : ReturnType

null

function(name : ParamType, ...) : ReturnType

0-1 Optional

function(x:Integer):String {" {x} "}

sequence types

: ElementSpec[]

[]

ElementSpec

0-n Sequence

[9, 14, 21, 4]

  关键是JavaFX 所以的变量也是走面向对象的路线的,这点和python基本一样

你可能感兴趣的:(java,python,JavaFX)