This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line!
See this thread for details.
Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

surekha raju

Greenhorn
+ Follow
since Mar 18, 2006
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 surekha raju

hey guys really sorry in the for loop i=0 and not i-0
The way u explained is excellent suchitra...
Thax a lot
This is from K&B chapter 1 language fundamentals...Please let me know about the logic here...
public class test
{
public static void main(String []args)
{
int [][][] x = new int[3][][];
int i,j;
x[0] = new int[4][];
x[1] = new int[2][];
x[2] = new int[5][];
for(i- 0;i<x.length;i++)
for(j=0;j<x[i].length;j++)
{
x[i][j] = new int[i+j+1];
System.out.println("size ="+x[i][j].length);
}
}
}


Answer of this is:11

thanks
thanx charles...i figured out others too...
thanks for ur explanation...i wont go wrong in future...
I would like to know concept behined this one....
public class example {
int i[] = {0};
public static void main(String args[]) {
int i[] = {1};
change_i(i);
System.out.println(i[0]);
}
public static void change_i(int i[]) {
int j[] = {2};
i = j;
}
}


The program does not compile.
The program prints 0.
The program prints 1.
The program prints 2.
The program prints 4.

answer is rogram prints 1

one more question

public class example {
int i = 0;
public static void main(String args[]) {
int i = 1;
change_i(i);
System.out.println(i);
}
public static void change_i(int i) {
i = 2;
i *= 2;
}
}


The program does not compile.
The program prints 0.
The program prints 1.
The program prints 2.
The program prints 4.

answer is rogram prints 1

one more please

public class example {
int i[] = {0};
public static void main(String args[]) {
int i[] = {1};
change_i(i);
System.out.println(i[0]);
}
public static void change_i(int i[]) {
i[0] = 2;
i[0] *= 2;
}
}


The program does not compile.
The program prints 0.
The program prints 1.
The program prints 2.
The program prints 4.


answer is rogram prints 4

let me know about the logic please

thanks in advance
please let me know how it works...
public class test {
public static void main(String args[]) {
System.out.println(args[0]+" "+args.length);
}
}


1.java
2.test
3.lets
4.3
5.4
6.5
7.6

output is :3 option and and fifth(ie lets and 4)

let me know
thanks
Anyone please let me know the output of both...
executed by entering "java test lets see what happens".
1.public class test {
public static void main(String args[]) {
System.out.println(args[0]+" "+args[args.length-1]);
}
}

Answer for this is:lets happens

2.
public class test {
public static void main(String args[]) {
System.out.println(args[0]+" "+args[args.length]);
}
}


answer is:The program will throw an ArrayIndexOutOfBounds exception
I am planning to take scjp1.4 next month.Is scjp 1.4 still available.Or do we need to take the upgrade version 1.5.

And one more question....
What is the difference between both...
What other topics have been included in scjp 1.5.

please let me know
thanks in advance
Thanx Jesus Angeles...i have one more question for u???Is one and half month of solid perparation enough....Is K&B book & some exams from net r enough for writing the exam..Do let me know.
Hey i dont do that well with the questions at the back from K&B....I give me some tips.
Thanx for the link
I am planning to write Scjp 1.4.I am preparing from K&B.Where can i find practise test on each topic for free.Do let me know.