summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/listings-ext/listings-ext_exmpl_a.java
blob: 1a23d5f5c36eb746cc891bf3eabe2543a618a795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package application.helloworld;
// be: packages
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
// ee: packages
/**
 * HelloWorld.java
 */
public class HelloWorld
{
    // be: specific constructor
    public HelloWorld()
    {
        System.out.println("Object HelloWorld created");
    } // end of specific constructor "HelloWorld()"
    // ee: specific constructor

    public static final void main(final String[] args)
    {
        String baseName = "HelloWorld";
        // be: using the resource bundle
        ResourceBundle rb = ResourceBundle.getBundle(baseName);
        String greetings = rb.getString("hello_msg");
        // ee: using the resource bundle
        System.out.printf("%s\n", greetings);
    } // end of method "main(String[] args)"
} // end of class "HelloWorld"