<< < Page 3 of 5 > >> |
From: poulomi24 | Reply 41 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 3 |
It is the name of memory location those value can be changed.
Posted at: Thu Mar 4 15:21:48 2010 (GMT)
|
From: poulomi24 | Reply 42 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 8 |
z =(x*x*x)+(y*y*y) - ((x*y)/z)
Posted at: Thu Mar 4 15:24:11 2010 (GMT)
|
From: navjotaking | Reply 43 of 86 | Reply | View replies (2)
|
Subject: Contributed Answer/Explanation to Q. 18 |
output will be
Posted at: Mon Mar 15 07:54:29 2010 (GMT)
|
From: navjotaking | Reply 44 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 18 |
output will be- a=98
the value of --b =30-1=29
the value of c++ =40
the value of again b =29
so the output will be
a=29+40+29=98
a=98 (ANS.)
Posted at: Mon Mar 15 07:57:09 2010 (GMT)
|
From: navjotaking | Reply 45 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 18 |
output will be---------------- a=98
the value of --b =30-1=29
the value of c++ =40
the value of again b =29
so the output will be
a=29+40+29=98
a=98 (ANS.)
Posted at: Mon Mar 15 07:57:27 2010 (GMT)
|
From: shreya_ganesh | Reply 46 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 19 |
They are both String functions used in Java.
Equals() method just checks whether String 1 = String 2. It is used to check
the equality of 2 strings. Its syntax is:
boolean variable = String variable1.equals(String variable2);
it returns only a boolean value: true or false.
However, CompareTo() function is used to not only check whether one string
is the same as the other, but also to state which is greater, according to
the ASCII values of the corresponding characters in the Strings.
SYNTAX:
int variable = String variable1.compareTo(String variable2);
Posted at: Mon Mar 15 16:13:20 2010 (GMT)
|
From: shreya_ganesh | Reply 47 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 22 |
The source code is given below:
import java.io.*;
public class even_odd
{
public static void main (String args[]) throws IOException
{
BufferedReader stdin = new BufferedReader (new
InputStreamReader (System.in));
System.out.println ("Enter the value of n: ");
int n = Integer.parseInt(stdin.readLine());
int even =0, odd=0;
for (int i = 1; i<=n; i++)
{
if (i%2==0)
{
even = even+i;
}
else
{
odd = odd+i;
}
}
System.out.println ("Sum of even numbers up to n =
" +even + " Sum of odd numbers up to n = " +odd);
}
}
Posted at: Mon Mar 15 16:22:52 2010 (GMT)
|
From: abrahamkynadi | Reply 48 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 12 |
The method is accessible only to the classes of the same package
Posted at: Wed Mar 24 12:00:11 2010 (GMT)
|
From: abrahamkynadi | Reply 49 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 21 |
Return Statement is used to return a value to the calling method.
It can be a constant,variable or an expression
Posted at: Wed Mar 24 12:04:55 2010 (GMT)
|
From: gauravshah10 | Reply 50 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 1 |
wrapping up of data and operations into a single unit(called class) is known
as encapsulation
Posted at: Thu Mar 25 07:13:19 2010 (GMT)
|
From: innocentkriti | Reply 51 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 1 |
it is a ability of object to place a boundary around its properties i.e.
datas and members......n it is d wrapping upp of datas and functions in a
unit called class
Posted at: Thu Mar 25 14:25:27 2010 (GMT)
|
From: alokrajiv | Reply 52 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 14 |
Answer
Multiple funxtions with the sam identifier names with
number of parameters
datatypes of parameters
order of parameters of varying datatype
Posted at: Thu Mar 25 16:38:34 2010 (GMT)
|
From: alokrajiv | Reply 53 of 86 | Reply | View replies (2)
|
Subject: Contributed Answer/Explanation to Q. 14 |
Answer :
Multiple funxtions with the sam identifier names with
number of parameters
datatypes of parameters
order of parameters of varying datatype
Example :
class puki
{
public static void main(String[] args)
{
call();
call(1);
call(1,2);
call(1,'a');
}
public static void call()
{
System.out.println("Hello Java");
}
public static void call(int n)
{
System.out.println(n);
}
public static void call(int a,int b)
{
System.out.println(a+" "+b);
}
public static void call(int x,char ch)
{
System.out.println(x+" "+ch);
}
}
Posted at: Thu Mar 25 16:47:19 2010 (GMT)
|
From: alokrajiv | Reply 54 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 14 |
Answer :
Multiple funxtions with the same identifier names with
number of parameters
datatypes of parameters
order of parameters of varying datatype
Example :
class puki
{
public static void main(String[] args)
{
call();
call(1);
call(1,2);
call(1,'a');
}
public static void call()
{
System.out.println("Hello Java");
}
public static void call(int n)
{
System.out.println(n);
}
public static void call(int a,int b)
{
System.out.println(a+" "+b);
}
public static void call(int x,char ch)
{
System.out.println(x+" "+ch);
}
}
Posted at: Thu Mar 25 16:47:38 2010 (GMT)
|
From: alokrajiv | Reply 55 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 14 |
Answer :
Multiple funxtions with the same identifier names with
number of parameters
datatypes of parameters
order of parameters of varying datatype
Example :
class sample
{
public static void main(String[] args)
{
call();
call(1);
call(1,2);
call(1,'a');
}
public static void call()
{
System.out.println("Hello Java");
}
public static void call(int n)
{
System.out.println(n);
}
public static void call(int a,int b)
{
System.out.println(a+" "+b);
}
public static void call(int x,char ch)
{
System.out.println(x+" "+ch);
}
}
Posted at: Thu Mar 25 16:48:08 2010 (GMT)
|
From: navtej | Reply 56 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 9 |
Ans:-
A function that brings about change in the argumentthat it recieves is known
as an IMPURE FUNCTION.
Posted at: Sun Apr 4 06:01:18 2010 (GMT)
|
From: poulomi24 | Reply 57 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 6 |
i)primitive data type ii)reference data type
Posted at: Tue May 25 05:33:03 2010 (GMT)
|
From: ghk | Reply 58 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 18 |
- -b(29)+c++(40)+b(29)=29+40+29=98
Posted at: Sun May 30 05:46:16 2010 (GMT)
|
From: poulomi24 | Reply 59 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 7 |
Math.sqrt(a,2)+Math.sqrt(b,2);
Posted at: Fri Jun 11 06:07:44 2010 (GMT)
|
From: gl0312 | Reply 60 of 86 | Reply | |
Subject: Contributed Answer/Explanation to Q. 25 |
using math class & log method
class a
{
void method(int a)
{
System.out.println(Math.log(a));
}}
Posted at: Sat Jun 19 17:53:55 2010 (GMT)
|
<< < Page 3 of 5 > >> |