Additional Capabilities: Object-Oriented Program Development Using Java: A Class-Centered Approach
Additional Capabilities: Object-Oriented Program Development Using Java: A Class-Centered Approach
Additional Capabilities
Object-Oriented Program
Development Using Java:
A Class-Centered
Approach
Objectives
• Additional Features
• Bit Operators
• Command-Line Arguments
• Syntax:
– System.out.flush();
• Syntax:
– condition ? expression1 : expression2
• Ternary operator
– Otherwise result is 0
• Result of comparison is 1
– If either bit being compared is 1
– Otherwise, result is 0
• Unary operator
• Changes:
– Each 0 bit to 1
• Command line:
– Line on which the words Java and class name are typed
to run a program
– Always starts with the operating system prompt