[4140] in java-interest

home help back first fref pref prev next nref lref last post

Please help with small java small

daemon@ATHENA.MIT.EDU (Jonathan_Mark_Smith@CCMAIL.PRUSEC.)
Tue Dec 12 10:26:38 1995

From: Jonathan_Mark_Smith@CCMAIL.PRUSEC.COM
Date: Tue, 12 Dec 95 06:46:14 EST
To: java-interest@java.sun.com, decemj@rpi.edu, matt@shire.math.columbia.edu,
        rmg@Eng.Sun.COM, tdr20@cus.cam.ac.uk, timpe@starwave.com

     Can someone please help me to get the following sample working
//-------------file class_1.java 
     
import java.io.*;
import class_2;
class class_1 {
 private int x;
    
 void printx() {
  System.out.println("Number is " + x);
 }
     
 public static final void main(String av[]) {
  class_2 c;
  x = c.mult2(3);
  printx();
 }
}
//-- end of file class_1.java
//------------file class_2.java
class class_2 {
     
 public int mult2(int x) {
  return 3*x;
 }
}
     
//-- end of file class_2.java
     
     

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post