TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Java - Class And Object
Senthilvelan Sambamoorthy
Jul 26
2016
Code
462
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
class
test1
// test1 is class name
{
int
nou;
String nam;
String str;
String pla;
int
pin;
public
static
void
main(String arg[])
{
test1 t;
// t is object
t =
new
test1();
t.nou =
101
;
t.nam =
"Vivekanadhar"
;
t.str =
"Dubai Main Road"
;
t.pla =
"Dubai"
;
t.pin =
600001
;
System.out.println(
"Number :"
+t.nou);
System.out.println(
"Name : "
+t.nam);
System.out.println(
"Street : "
+t.str);
System.out.println(
"Place :"
+t.pla);
System.out.println(
"PinCode :"
+t.pin);
}
}
Class
Object
Java