test
import java.awt.Graphics;
public class Project extends java.applet.Applet
{
public void init()
{
// TODO: Initialization things here.
}
/**
* This is where things will get drawn to the screen within your applet.
*/
public void paint(Graphics g)
{
// Draw our hello world
g.drawString("Hello world from compilr.com with Java!", 50, 25);
}
}
can any one please tell me what does this mean:
class some
{
~some()
{cout<<"some's destroyed";}
};
void main()
{
some *a=new some;
some b;
some *c=new some;
}
just tell what does this ~ symbol mean ,i found it somewhere .but since i dont have ide,i cant check this code.
also,
what does some *a=new some; mean.??
is it creation of pointer to an object.please explain a bit .
would be grateful.
if any discrepancies,do point out.
how can i see the output ??
visitashi:
~some()
Is the definition for the destructor of the some class
some *a=new some;
creates a new instance of the some class and stores a pointer to it in a
Arsalan:
currently you have to run the application locally on your computer unless it is a java applet.
Hi,
I see this is your second time posting java sample code.
Did you need any help?
-----------------
Tim Speed
Compilr Developer and CTO