Java has a switch statement like most other languages. This example program demonstrates the switch statement without "break" after each case.
The output will be :This is three when x=3
This is default when x not equal to 1 or 2 or 3
class DefSwitch{
public static void main(String args[]){
int x=3;
switch(x){
case 1:
System.out.println("This is one");
default:
System.out.println("This is default");
case 2:
System.out.println("This is two");
case 3:
System.out.println("This is three");
}
}
}
Friday, April 25, 2008
Knowmax - our intelligence hub
" Ultimatix entails digitisation of the whole organisation end to end in real time through the web. With every single employee connected through this process across the world in all facilities and offices, Ultimatix is TCS’s digital platform.."

Knowmax is the intelligence hub within Ultimatix.
"Find Me" contest conducted every Monday question posted within Knowmax.
Tuesday, April 22, 2008
Monday, April 21, 2008
Jew Town Kochi
To know more about Jews in India read wikipedia. The synagogue in cochin is popularly known as the paradesi synagogue and was built in 1568 by the descendants of Spanish, dutch and European jews. Various conservation efforts are in place for the synagogue.
Simple PERL counter
A simple PERL counter that counts the number of times a page is loaded. The script reads the number stored in "counter.txt" and increments it by one and displays the same. The incremented value is then stored in "counter.txt".
#!/usr/bin/perl
print "Content-type:text/html\n\n";
open (MYFILE, 'counter.txt');
chomp($count=);
close (MYFILE);
$count++;
print $count;
open (MYFILE, '>counter.txt');
print MYFILE "$count\n";
close (MYFILE);
A simple script to demonstrate reading from and writing to a file using PERL.
#!/usr/bin/perl
print "Content-type:text/html\n\n";
open (MYFILE, 'counter.txt');
chomp($count=
close (MYFILE);
$count++;
print $count;
open (MYFILE, '>counter.txt');
print MYFILE "$count\n";
close (MYFILE);
A simple script to demonstrate reading from and writing to a file using PERL.
Sunday, April 20, 2008
Saturday, April 19, 2008
Subscribe to:
Comments (Atom)