Computer Science, asked by Rucanjalpho0e, 1 year ago

Method of Creating Class and Object
How to create class and object?

Answers

Answered by moldydemigod
0
class-import java.io.*;
import java.util.*;
class Program
{
object-scanner obj=new Scanner (System.in);
{
Answered by Samundeeswari
0
//creating a class
keyword tagname
{ private:----------;
public:----------;};
//creating class object
tagname object;

example...
class A
{ private:
int a,b;
char name[20];
float m;
public:
void input();
void process();
void output();
};
A n;

here 'n' is the class object and 'A' is the class name.... and those functions in public tag are member functions...
Similar questions