Outils pour utilisateurs

Outils du site


informatique:java:tips

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:java:tips [28/12/2015 01:05] – [Process Input Stream Reader] cyrilleinformatique:java:tips [16/06/2023 10:02] (Version actuelle) – [Swing] cyrille
Ligne 10: Ligne 10:
   * [[http://download.oracle.com/javase/tutorial/uiswing/components/table.html|How to Use Swing JTables]] (binding, cell editors, ...)   * [[http://download.oracle.com/javase/tutorial/uiswing/components/table.html|How to Use Swing JTables]] (binding, cell editors, ...)
   * About [[/informatique/java/tips/Drag & Drop|Drag & Drop]]   * About [[/informatique/java/tips/Drag & Drop|Drag & Drop]]
-  * Plein d'effets visuels avec Swing par Romain Guy: [[http://jroller.com/gfx/page/Archives]]+  * Plein d'effets visuels avec Swing par Romain Guy: <del>[[http://jroller.com/gfx/page/Archives]]</del>
 ===== CVS Format ===== ===== CVS Format =====
  
   * [[http://opencsv.sourceforge.net/]]: opencsv is a very simple csv (comma-separated values) parser library for Java. It was developed because all of current csv parsers I've come across don't have commercial-friendly licenses.   * [[http://opencsv.sourceforge.net/]]: opencsv is a very simple csv (comma-separated values) parser library for Java. It was developed because all of current csv parsers I've come across don't have commercial-friendly licenses.
 +
 +===== Read input from console =====
 +
 +Read console input using **java.io.Console** instance - //Don't work in Eclipse IDE//.
 +<code java>
 +private static void usingConsoleReader()
 +{
 +  Console  console = System.console();
 +  if (console != null)
 +  {
 +     String inputString = console.readLine("Name: ");
 +     System.out.println("Name entered : " + inputString);
 +  }
 +}
 +</code>
 +
 +Read console input using **BufferedReader** instance
 +<code java>
 +private static void usingBufferedReader()
 +{
 +  BufferedReader bufferRead = new BufferedReader( new InputStreamReader( System.in ) );
 +  String inputString = bufferRead.readLine();
 +  System.out.println( inputString );
 +}
 +</code>
 +
 +Read console input using **Scanner** instance
 +<code java>
 +private static void usingScanner()
 +{
 +  Scanner scanIn = new Scanner( System.in );
 +  String inputString = scanIn.nextLine();
 +  scanIn.close();           
 +  System.out.println(inputString);
 +}
 +</code>
  
 ===== Process Input Stream Reader ===== ===== Process Input Stream Reader =====
informatique/java/tips.1451261157.txt.gz · Dernière modification : 28/12/2015 01:05 de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki