Here you can find the source of chopCommentFromArgs(String[] args)
public static String[] chopCommentFromArgs(String[] args)
//package com.java2s; //License from project: Open Source License public class Main { public static String[] chopCommentFromArgs(String[] args) { if (args == null) { return null; } // Written with help from Trevor Walker. int commentStart = -1; for (int i = 0; i < args.length; i++) { if (args[i] != null && args[i].startsWith("//")) { commentStart = i;//from w ww . j a va2s. c o m break; } } if (commentStart < 0) { return args; } String[] newArgs = new String[commentStart]; for (int i = 0; i < commentStart; i++) { newArgs[i] = args[i]; } return newArgs; } }