Categorías: Todo - expression - method

por Huy Thong Cao hace 4 años

275

Organigram

A Java method is being defined with a static modifier, indicating that it belongs to the class rather than instances of the class. The method is designed to perform a search operation, and it takes two parameters:

Organigram

StatementWothoutTrailingSubStatement

ExpressionSatement

System.out.printf("%d is in %s at %d", x, a, isAt);

search(a,x)

TextIo.getInt()

VariableDeclaration

VariableDeclaratorList

{1, 1, 2, 3, 5, 8, 13}

UnannReferenceType

FormalparameterList

FormalP

args

UnannRefenrenceType

UnannArrayType

UnannTypeVariable Dims

String[]

main

void
Public static

Task 7

return -1

ForStatementNoShortIf

BasicForStatementNoShortIf

IfThenStatement

return i

RelationalExpression

x == a[i+0]

ForUpdate

StatementExpressionList

StatementExpression

UnaryStatement

i++

RelationalExperssion

Forlnit

VariableInitializer

0

VariableDeclaratorld

FormalParameterList

FomalParameters

x

Iderntifier

a

UnannReferenceTypr

UnannArrayTyoe

UnannPrimitiveTypeDIms

int[]

JavaLetters

Javaletter

search

static

Task 6

MethodDeclaration

StattementWithoutTrailingSubstatement

IfThenElseNoShortIfStatement

min=b

StatementNoshortIf

min =a

MethodModifier

Task 5

StatementWithoutTrailingSubstatement

ReturnStatement

return min

ConditionalExpression

:b

Expression

?a

ConditionalOrExpression

a<=b

LocalVariableDeclarationStatement

VariableDeclarator

identifier

min

LocalVariableDeclaration

'b'

Formal Parameter

'a'

UnnaType

NumbericType

Identifier Chars

Java Letter Or Digis

'i','n'

Java Letter

'm'

result
Private static

Task 4

Method Declaration

Method Body

Block
Statement

Statement Without Trailing Substatement

Return Statement

return j

Local Variable Declaration Statement

Local Variable Declarationbtopic

Variable Declarator List

Variable Intializer

i+1

Variable Declaratorld

j

Uann Peimitive Type

Method Header

Method Declarator
Formal Parameter List

Formal Parameters

Variable Declarator

i

UnannPrimitiveType

Numberic Type

Identifier chars

Java letter

nextCount

int

Method Modifier

Static

Task 3

Method declaration

MethodBody

{ // TODO: implements this }

MethodHeader

MethodDeclarator

Task 2


([FormalParameterList])

FormalParameters

FormalParameter

VariableDeclaratorId

... "a"

UnannType

Subtopic

int []

Identifier

IdentifierChars

{JavaLetterOrDigit}

“n”

“i"

JavaLetter

“m”

Result
float

{MethodModifier}

stactic