Samsung_AppInventor_JavaBasic-master.zip

  • H5_342166
    了解作者
  • 11.8KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-16 02:11
    上传日期
app+java+源码
Samsung_AppInventor_JavaBasic-master.zip
  • Samsung_AppInventor_JavaBasic-master
  • src
  • exercise_07
  • TestOperator.java
    1.4KB
  • exercise_11
  • TestForEachArray.java
    308B
  • exercise_15
  • TestContinue.java
    227B
  • exercise_10
  • TestFor.java
    317B
  • exercise_14
  • TestBreak.java
    221B
  • exercise_08
  • TestIf.java
    857B
  • exercise_02
  • TestVariable.java
    207B
  • exercise_03
  • TestVariableNamingRule.java
    493B
  • exercise_04
  • TestPrimitiveType.java
    748B
  • exercise_06
  • ArrayCreate.java
    340B
  • exercise_12
  • TestWhile.java
    230B
  • exercise_01
  • HelloWorld.java
    152B
  • exercise_09
  • TestSwitch.java
    413B
  • exercise_05
  • TestDiffType.java
    881B
  • exercise_13
  • TestDoWhile.java
    236B
  • .settings
  • org.eclipse.jdt.core.prefs
    598B
  • .project
    426B
  • .classpath
    301B
  • .gitignore
    6B
内容介绍
package exercise_07; public class TestOperator { public static void main( String[] args ) { //대입 연산자 int a = 10, b = 3; int c = 0, d = 0; c = a + b; System.out.println( "c = " + c ); c += b; // c = c + b; System.out.println( "c = " + c ); c -= a; // c = c - a; System.out.println( "c = " + c ); //산술 연산자 a = 10; b = 3; c = 0; System.out.println( "a + b = " + ( a + b ) ); System.out.println( "a - b = " + ( a - b ) ); System.out.println( "a * b = " + ( a * b ) ); System.out.println( "a / b = " + ( a / b ) ); // System.out.println( "a / d = " + ( a / d ) ); System.out.println( "a % b = " + ( a % b ) ); //증감 연산자 int num = 10, num2 = 10; int result = 0, result2 = 0; result = num++; //result = num; //num = num + 1; System.out.println( "result = " + result ); result2 = ++num2; //num2 = num2 + 1; //result2 = num2; System.out.println( "result2 = " + result2 ); //단항 연산자 a = 10; b = -a; System.out.println( "b = " + b ); boolean flag = true; System.out.println ( !flag ); int divisor = 0; int dividend = 100; /* if ( divisor != 0 & dividend/divisor > 10 ) { System.out.println( "몫이 10보다 크다." ); } */ if ( divisor != 0 && dividend/divisor > 10 ) { System.out.println( "몫이 10보다 크다." ); } } }
评论
    相关推荐