<< < Page 4 of 5 > |
From: gl0312 | Reply 61 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 26 |
using math class
class a
{void method(int a)
{
System.out.println(Math.abs(a));
}}
Posted at: Sat Jun 19 17:55:25 2010 (GMT)
|
From: gl0312 | Reply 62 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 27 |
using math class
class a
{
void method (int a)
{
System.out.println(Math.sqrt(a));
}}
Posted at: Sat Jun 19 17:57:09 2010 (GMT)
|
From: gl0312 | Reply 63 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 28 |
using math class
class a
{
void method(double d)
{
d=Math.random();
System.out.println(d);
}}
Posted at: Sat Jun 19 18:00:50 2010 (GMT)
|
From: emma94 | Reply 64 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 1 |
The system of wrapping data and function into a single unit is called
encapsulation.
Posted at: Thu Sep 30 09:32:14 2010 (GMT)
|
From: emma94 | Reply 65 of 86 | Reply | View replies (1)
|
Subject: Contributed Answer/Explanation to Q. 2 |
Object is a unique entity, which contains data and functios together in an
Object Oriented Programming (OOP's) Language.
Taking a table into consideration :-
CHARACTERISTICS:
i) It has four legs.
ii) It has a plain top.
BEHAVIOURS:
i) It is used to put utensils, glasses, etc.
ii) It is used to put books,pens,pencils,etc.
Posted at: Thu Sep 30 09:38:39 2010 (GMT)
|
From: emma94 | Reply 66 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 2 |
Object is a unique entity, which contains data and functions together in an
Object Oriented Programming (OOP's) Language.
Taking a table into consideration :-
CHARACTERISTICS:
i) It has four legs.
ii) It has a plain top.
BEHAVIOURS:
i) It is used to put utensils, glasses, etc.
ii) It is used to put books,pens,pencils,etc.
Posted at: Thu Sep 30 09:39:18 2010 (GMT)
|
From: emma94 | Reply 67 of 86 | Reply | View replies (3)
|
Subject: Contributed Answer/Explanation to Q. 3 |
Variables are also called identifiers in Java Programming. A variable is a
named memory location,which contains values.The value changes depending upon
circumstancesand problems in a program.
Posted at: Thu Sep 30 09:41:59 2010 (GMT)
|
From: emma94 | Reply 68 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 3 |
Variables are also called identifiers in Java Programming. A variable is a
named memory location,which contains values.The value changes depending upon
circumstancesand problems in a program. A variable can possess any
combination of letters without spaces
Posted at: Thu Sep 30 09:43:00 2010 (GMT)
|
From: emma94 | Reply 69 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 3 |
Variables are also called identifiers in Java Programming. A variable is a
named memory location,which contains values.The value changes depending upon
circumstancesand problems in a program. A variable can possess any
combination of letters without spaces
SYNTAX:-
<data type> <space>
<variable name>
int m;
float p,q,r;
Posted at: Thu Sep 30 09:44:28 2010 (GMT)
|
From: emma94 | Reply 70 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 3 |
Variables are also called identifiers in Java Programming. A variable is a
named memory location,which contains values.The value changes depending upon
circumstancesand problems in a program. A variable can possess any
combination of letters without spaces
SYNTAX:-
<data> <space>
<variable name>
int m;
float p,q,r;
Posted at: Thu Sep 30 09:45:15 2010 (GMT)
|
From: emma94 | Reply 71 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 6 |
i)Primitive Data Type ii) Non-Primitive Data Type.
PRIMITIVE DATA TYPE:-
Eg:- short,byte,int,long,float,double.
NON-PRIMITIVE DATA TYPE:-
Eg:- Classes,arrays,interfaces etc.
Posted at: Thu Sep 30 09:49:01 2010 (GMT)
|
From: emma94 | Reply 72 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 17 |
A constructor which initialises instant variables of an object with definite
values readily defined as Default Constructor.
EXAMPLE:-
class dconst
{
//class to use default constructor
int a,b;
dconst()
{
a=5;
b=8;
}
void display()
{
System.out.println("The values of a is"+a+ "and the value of
b is" +b);
}
Posted at: Thu Sep 30 09:56:26 2010 (GMT)
|
From: krutika | Reply 73 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 1 |
the wrapping up of code and data in one single unit is termed as
encapsulation
Posted at: Mon Oct 25 17:59:23 2010 (GMT)
|
From: krutika | Reply 74 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 5 |
it is used for the creation of object
Posted at: Mon Oct 25 18:01:13 2010 (GMT)
|
From: krutika | Reply 75 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 9 |
a fuction which dosen't have similar operations in it
Posted at: Mon Oct 25 18:05:11 2010 (GMT)
|
From: krutika | Reply 76 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 10 |
if can be used for all the mathematical purposes whereas switch can be used
for checking and comparing
Posted at: Mon Oct 25 18:06:52 2010 (GMT)
|
From: krutika | Reply 77 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 17 |
when no constructor is provided then the class itself provides a default
constructor which dosen't accept any arguments
Posted at: Mon Oct 25 18:11:29 2010 (GMT)
|
From: krutika | Reply 78 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 22 |
program
class odd n even
{
public void main(int n)
{
for(int i=1;i<=n;i++)
{
if(i%2==0)
{
even=even+1;
}
else
{
odd=odd+1;
}
System.out.println("sum of even"+even+"sum of odd"+odd);
}}}
Posted at: Mon Oct 25 18:18:55 2010 (GMT)
|
From: harshaktg | Reply 79 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 1 |
The answer is given below
The process of wrapping up of data and functions into a single unit is
called encapsulation
Posted at: Thu Dec 16 02:02:26 2010 (GMT)
|
From: jam31 | Reply 80 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 1 |
the methods under the protective custody of their methods is called
encapsulation
Posted at: Tue Dec 21 12:39:40 2010 (GMT)
|
<< < Page 4 of 5 > |