我正在尝试编写以下代码.但它给了我错误,请帮助我.
int six=06;
int seven=07;
int abc=018;
int nine=011;
System.out.println("Octal 011 ="+nine);
System.out.println("octal O18 =" + abc);
Run Code Online (Sandbox Code Playgroud)
为什么我不能给018和019变量.我可以给变量赋值020和021.为什么会这样?这背后的原因是什么,请告诉我.
我得到了以下错误
integer number too large: 018
int eight=018;
Run Code Online (Sandbox Code Playgroud) 我在java文件中有字符串类型方法,它包含字符串数组,当我尝试在jsp中调用时,它给了我一个错误.
public String[] ordering(ActionRequest actionRequest,ActionResponse actionResponse)
throws IOException,PortletException
Run Code Online (Sandbox Code Playgroud)
JSP:
<%
TestiPortlet obj=new TestiPortlet();
String str[]=obj.ordering(actionRequest,actionResponse);
out.println(str[0]);
%>
Run Code Online (Sandbox Code Playgroud)
错误:
Multiple annotations found at this line:- actionResponse cannot be resolved to a variabl-actionRequest cannot be resolved to a variable
Stacktrace:
javax.portlet.PortletException: org.apache.jasper.JasperException: An exception occurred processing JSP page /html/testi/list.jsp at line 8
5:
6: <%
7: TestiPortlet obj=new TestiPortlet();
8: String str[]=obj.ordering(actionRequest,actionResponse);
9: out.println(str[0]);
10: %>
11:
Run Code Online (Sandbox Code Playgroud) 你好我是新的jsp我想检查jsp中的条件.值是否为空.?我在jsp页面中编写了以下代码
<% String s = request.getParameter("search"); %>
<%=s %>
<% if (<%=s ==null) { %>
<div>textbox is empty</div>
<% } else { %>
<div>textbox value..
<% } %>
Run Code Online (Sandbox Code Playgroud)
如果textbox值为null,我在变量中获取文本框值,然后它应显示第一个消息othervise second.告诉我该怎么办?