Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 03-11-2009
Member
 
Join Date: Nov 2009
Posts: 518
explain class in java

Hi,
I am a new bee to java. I like this programming language very much because it uses the object oriented features. I know java classes, but an good explanation can help me know classes better. Thanks
Reply With Quote
  #2  
Old 03-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: explain class in java

Java is a object-oriented programming. In java programming language a class acts as a construct and it is used as blueprint to create objects. The blueprint is the state and behavior and all objects of the class share it. An object is called the instance of the class.

Last edited by Praetor : 03-11-2009 at 09:43 AM.
Reply With Quote
  #3  
Old 03-11-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: explain class in java

Classes are the fundamental of java programming language. An class employee can be defined as:
class Employee {
int age;

double salary;
}

Here "Employee" is a class. By convention the initial of a class is capital.
Reply With Quote
  #4  
Old 03-11-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: explain class in java

Classes are used in java so that the code can be robust and reused. Classes simplify the work between interrelated data. Here is another example of class in java
public class Film {
String called;
int minutes;
public Film (String title, int length) {
called = title;
minutes = length;
}
public int getminutes() {
return minutes;
}
public String getcalled() {
return called;
}
public void setminutes(int length) {
minutes = length;
}
}
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "explain class in java"
Thread Thread Starter Forum Replies Last Post
Explain java xor (^) operator sligh Software Development 5 09-05-2012 06:44 PM
Explain how to define function outside the class in C++? Palnila Software Development 4 29-12-2010 03:11 AM
Converting java class to java bean class Ucchal Software Development 6 09-08-2010 10:24 AM
Explain the System.Exception class of C# Jesus2 Software Development 3 17-11-2009 03:51 AM
Explain Try Catch Block in java cyber-noob Software Development 3 16-11-2009 02:13 PM


All times are GMT +5.5. The time now is 05:31 PM.