ex1

1 reply [Last post]
Offline
Last seen: 1 year 37 weeks ago
Joined: 08/31/2010
Posts:

import java.util.*;
import java.lang.*;
public String getVal(String val){

if(val != null && vl.trim().length()>0)
return val.trim();
return “Siva”.trim();

}

class StrTest{

public static void main(String args[]){

String n = ” “;
String s = getVal(n);
System.out.println(s);

}

}

tim.speed's picture
Offline
Last seen: 3 days 7 hours ago
Joined: 02/24/2010
Posts:
Currently when compiling Java

Currently when compiling Java in compilr as a standard application, rather than an applet. You will need to name your class containing the main method as "Program"

We will be adding the capability to choose which class you'd like to use as the main entry point over the next few weeks.

-----------------
Tim Speed
Compilr Developer and CTO