欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android studio 運行main 函數(shù)的方法

 更新時間:2020年09月08日 10:17:18   作者:小陳哥哥_  
這篇文章主要介紹了Android studio 運行main 函數(shù)的方法,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

標(biāo)題Gradle構(gòu)建問題

切換到Project工程下.idea/gradle.xml添加屬性
<option name="delegatedBuild" value="false" />

圖例

在這里插入圖片描述

PS:下面通過示例代碼看下JAVA中的main函數(shù)

package com.han;

public class HanTest {
 public static void main(String[] args){
 if(args==null){
  throw new NullPointerException("The input is \"null\"");
 }else if((args.length!=1&&args.length!=2)){
  Throwable cause=new Throwable("You have to input 1 or 2 String arguments");
  throw new IllegalArgumentException("Wrong numbers of args",cause);
  //throw new IllegalArgumentException("Wrong numbers of args");
 }else if(args.length==1){
  System.out.println(args[0]);
 }else if(args.length==2){
  System.out.println(args[0]);
  System.out.println(args[1]);
 }
 }
}
package com.han;
public class HanTest2 {
 public static void main(String[] args){
 String[] input={"han"};
 //HanTest.main(null);
 HanTest.main(input);
 }
}

總結(jié)

到此這篇關(guān)于Android studio 運行main 函數(shù)的方法的文章就介紹到這了,更多相關(guān)Android studio 運行main 函數(shù)內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論