Nadeem Malik

Greenhorn
+ Follow
since Nov 22, 2000
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nadeem Malik


hi,
String str1="str";
this line creates a string object "str" in string pool and its reference is in str1.
str1.concat("str1");
here u create an anonymous new string in a pool "strstr1"
but u did'nt print that.
If u use System.out.println here u will see tha same result at line 2.
System.out.println(str1);
this line is ok, it prints str.

System.out.println(str1.concat("str1"))
now u use this, therefore it prints strstr1.
so at line 0, u create a string but not print it.
at line 2 u again do the same thing but print it.
hope it helps.
Thanx Nasir Khan,
i am now satisfied.
hi all,
plzz can someone explain this,
Array size is never specified with the reference variable, it is always maintained with array object.
plzz give example.
thanx.
hi all,
plzz try this,
(Q1)
5<<32 results 5
5<<-32 results 5
5<<33 results 10
these are ok but
plzz explain this,
5 << -33 results -2147483648 i.e the lowest boundry of int datatype.
(Q2)
plzz explain
-1 >> 1 results -1 not 0
Hi,
Javed Khan is right, u should by this book for preparation of exams.
[This message has been edited by Nadeem Malik (edited December 03, 2000).]
Hi friendz,
I read these lines in a book,can some one explain this:
Static inner class must access the members of its enclosing class through and object because it is static.
That is, it cannot refer to members of its enclosing class directly.
hi Hina,
Over loaded methods must differ in the type and/or number of their parameters. The return type alone is not enough to distinguish the two methods.
Choice 1 is absolutely correct.

Hi,
shaila, i suggest u should by new version of java certification
exam book, i.e 1.2.
hi,
i think u should try this.
import java.io.*;
class useint{
public static void main (String args[])
throws IOException {

BufferedReader b = new BufferedReader
(new InputStreamReader(System.in));
String string;
int i;
int sum = 0;
System.out.println("Please input numbers:");
System.out.println("Type 0 to exit");

do{
string = b.readLine();
try{
i = Integer.parseInt(string);
} catch(NumberFormatException NFE){
System.out.println("Please try again");
i = 0;
}

sum = sum + 1;
System.out.println("Count = " sum);
} while(i != 0);
}
}
22 years ago
Plzz tell me why we use wrapper classes.
if this is possible:
int a = 10;
then why should we use this:
Integer a = new Integer(10);
22 years ago