public static Boolean valueOf(String s)
Returns a Boolean with a value represented by the specified String. The Boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true".
Example: Boolean.valueOf("True") returns true.
Example: Boolean.valueOf("yes") returns false.
Originally posted by Timmy Marks:
Thread is part of java.lang
the run method is defined in the Runnable interface; also part of java.lang
Originally posted by Venkat Ramsimha:
public class SwitchTest
{
public static void main(String []args)
{
System.out.PrintIn("value =" +switchIt(4));
}
public static int switchIt(int x)
{
int j = 1;
switch(x)
{
case 1: j++;
case 2: j++;
case 3: j++;
case 4: j++;
case 5: j++;
default:j++;
}
return j + x;
}
}
hi all,
can anybody explain y for the above program the output is 8
thanks,
venkat
Originally posted by Venkat Ramsimha:
public class Fooaw implements Runnable
{
void run (Thread t)
{
System.out.println("Running");
}
public static void main (String[] args)
{
new thread (new Fooaw()).start();
}
}
Hi All,
can anybody provide the explanation as why the above program is giving compile time errors
thanks
venkat
static void printS2(){
System.out.println("p.PrintS1");
}
void printS2(){
System.out.println("P. printS2");
}