Hi
Need help in these
1.How can I Optimize this Java code. Assume all variables have been declared and have the correct data type.

String str = "";
for( int i=0; i < 1000; i++ ) {
str += myStringArray[i];
}

2.
What's wrong with this Java code? Assume all variables have been declared and have the correct data type.
try {
PreparedStatement stmt = conn.prepareStatement( "select top ? my_column from my_table" );
stmt.setInt( 1, myNum );

rs = stmt.executeQuery();
} finally {
conn.close();
}

3.
What is the output of this Java fragment?
int a = 0;
int b = 0;

if( false & a++ > 0 ) {
a = 100;
}

if( false && ++b > 0 ) {
b = 100;
}

Please reply
Regards

System.out.println(a);
System.out.println(b);