Domino Code Fragment
| Code Name* Compiling and running a Java program | Date* 03/17/2026 | Source (or email address if you prefer)* [email protected] IP address:.104.23.197.111 | |
| Description* 2. This is a stand-alone program that implements the Runnable interface: | Type* Java | Categories* (Misc) | |
| Implementation: | Required Client: | Server: |
| Limitations: | Comments: | |
public class platform2 implements Runnable
{
public static void main(String argv[])
{
platform2 t = new platform2();
NotesThread nt = new NotesThread((Runnable)t);
nt.start();
}
public void run()
{
try
{
Session s = Session.newInstance();
String p = s.getPlatform();
System.out.println("Platform = " + p);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}