我正在尝试将长值传递给函数。但它说“令牌“长”上的语法错误,删除此令牌“。请解释这是什么以及何时发生这种错误
代码
public static void main(String[] args) {
Calendar currenttime = Calendar.getInstance();
Date date = currenttime.getTime();
long timeInMillisSinceEpoch = date.getTime();
long ctimeInMinutesSinceEpoch = timeInMillisSinceEpoch / 1000;
Calendar subhr = Calendar.getInstance();
subhr.add(Calendar.HOUR, -1);
Date date1 = subhr.getTime();
long timeInMillisSinceEpoch1 = date1.getTime();
long btimeInMinutesSinceEpoch1 = timeInMillisSinceEpoch1 / 1000;
//error on this line
printCSV(long btimeInMinutesSinceEpoch1,long ctimeInMinutesSinceEpoch);
}
public static void printCSV(long bdata,long cdata) {
try {
URL url = new URL(protocol + "://" + hostname + "/apiv2/csv.xml?username=" + userName + "&password=" + password + "&form_id=" + formId + "&begin_second="+bdata +"&end_second="+cdata);
HttpURLConnection urlCon = (HttpURLConnection) url.openConnection();
System.out.println(urlCon);
}
请帮助我。