I want to use the lang variable in my code, and give the value in the if
command.
Is the below code possible in .jsp page ?
<%
String language = "EN";
EN lang;
if (language.equals("EN")){
lang = new EN();
}
else if (language.equals("FR")){
lang = new FR();
}
%>
// html ...
<% out.print(lang.variable1); %>
i got this error :
incompatible types; found: mypackage.FR, required: mypackage.EN
code please ?