alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (loopStat.js.EXPECTED)

This example Java source code file (loopStat.js.EXPECTED) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

assignmentexpression, binaryexpression, blockstatement, callexpression, dowhilestatement, expressionstatement, forinstatement, forstatement, identifier, literal, memberexpression, program, updateexpression

The loopStat.js.EXPECTED Java example source code

{
    "type": "Program",
    "body": [
        {
            "type": "WhileStatement",
            "test": {
                "type": "Literal",
                "value": true
            },
            "body": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "ExpressionStatement",
                        "expression": {
                            "type": "CallExpression",
                            "callee": {
                                "type": "Identifier",
                                "name": "print"
                            },
                            "arguments": [
                                {
                                    "type": "Literal",
                                    "value": "hello"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "DoWhileStatement",
            "body": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "ExpressionStatement",
                        "expression": {
                            "type": "CallExpression",
                            "callee": {
                                "type": "Identifier",
                                "name": "print"
                            },
                            "arguments": [
                                {
                                    "type": "Literal",
                                    "value": "hello"
                                }
                            ]
                        }
                    }
                ]
            },
            "test": {
                "type": "Literal",
                "value": true
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "ForInStatement",
            "left": {
                "type": "Identifier",
                "name": "i"
            },
            "right": {
                "type": "Identifier",
                "name": "obj"
            },
            "body": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "ExpressionStatement",
                        "expression": {
                            "type": "CallExpression",
                            "callee": {
                                "type": "Identifier",
                                "name": "print"
                            },
                            "arguments": [
                                {
                                    "type": "MemberExpression",
                                    "object": {
                                        "type": "Identifier",
                                        "name": "obj"
                                    },
                                    "property": {
                                        "type": "Identifier",
                                        "name": "i"
                                    },
                                    "computed": true
                                }
                            ]
                        }
                    }
                ]
            },
            "each": false
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "ForInStatement",
            "left": {
                "type": "Identifier",
                "name": "i"
            },
            "right": {
                "type": "Identifier",
                "name": "obj"
            },
            "body": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "ExpressionStatement",
                        "expression": {
                            "type": "CallExpression",
                            "callee": {
                                "type": "Identifier",
                                "name": "print"
                            },
                            "arguments": [
                                {
                                    "type": "Identifier",
                                    "name": "i"
                                }
                            ]
                        }
                    }
                ]
            },
            "each": true
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "ForStatement",
            "init": {
                "type": "AssignmentExpression",
                "operator": "=",
                "left": {
                    "type": "Identifier",
                    "name": "i"
                },
                "right": {
                    "type": "Literal",
                    "value": 0
                }
            },
            "test": {
                "type": "BinaryExpression",
                "operator": "<",
                "left": {
                    "type": "Identifier",
                    "name": "i"
                },
                "right": {
                    "type": "Literal",
                    "value": 10
                }
            },
            "update": {
                "type": "UpdateExpression",
                "operator": "++",
                "prefix": false,
                "argument": {
                    "type": "Identifier",
                    "name": "i"
                }
            },
            "body": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "ExpressionStatement",
                        "expression": {
                            "type": "CallExpression",
                            "callee": {
                                "type": "Identifier",
                                "name": "print"
                            },
                            "arguments": [
                                {
                                    "type": "Identifier",
                                    "name": "i"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

Other Java examples (source code examples)

Here is a short list of links related to this Java loopStat.js.EXPECTED source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.