Debian Codegraph @

texmf-dist/doc/latex/listings-ext/listings-ext_exmpl_a.java

raw
1 package application.helloworld;
2 // be: packages
3 import java.util.Locale;
4 import java.util.MissingResourceException;
5 import java.util.ResourceBundle;
6 // ee: packages
7 /**
8 * HelloWorld.java
9 */
10 public class HelloWorld
11 {
12 // be: specific constructor
13 public HelloWorld()
14 {
15 System.out.println("Object HelloWorld created");
16 } // end of specific constructor "HelloWorld()"
17 // ee: specific constructor
18
19 public static final void main(final String[] args)
20 {
21 String baseName = "HelloWorld";
22 // be: using the resource bundle
23 ResourceBundle rb = ResourceBundle.getBundle(baseName);
24 String greetings = rb.getString("hello_msg");
25 // ee: using the resource bundle
26 System.out.printf("%s\n", greetings);
27 } // end of method "main(String[] args)"
28 } // end of class "HelloWorld"