Archive for the ‘Ostatné/Other’ Category

Vector and HashMap

nedeľa, september 26th, 2010

Output:veroxybd.com

[1]: text2
Vector:
text1
text2
2
null
Size:4
---------
*.html - HyperText Markup Language
*.dll - null

Easy example/Jednoduchý príklad

nedeľa, september 26th, 2010
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Hello {
	  static void print(String s)
	  { 
	     System.out.println(s);
	  }
	  public static void main(String args[])
	  {
		  String pozdrav;
		  String vstup;
		  BufferedReader in;
		  in = new BufferedReader(new  InputStreamReader(System.in));
		  try{
		      vstup = in.readLine(); }
		  catch(IOException e) {vstup="";}
		  pozdrav="Servus "+vstup+", dnes je " + (new Date().getDate())+"."+ (new Date().getMonth())+".";
	
		  print(pozdrav);
	  }
}