Srinivas Redd

Greenhorn
+ Follow
since Mar 23, 2006
Merit badge: grant badges
For More
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 Srinivas Redd

Hi,

I am writing a program to convert the SOAP message to a tree structure. The tree that I am going to create should be a N-Ary tree. I have created a class like the below one which is a data structure that acts as a node.Each element in the SOAP message is taken as an object.Complex elements( one object ) will maintain link to simple elements (objects)

Class nAryTree
{
String name;
String type;
String value;
nAryTree nodes[] = new nAryTree[100];

**** some functions goes on here ***
}

I have taken an array to point to simple elements in an array which is set at a size of 100. Assume a complex element movie which has name,language as the only two elements

<movie>
<name>Titanic</name>
<language>english</language>
</movie>

I am wasting lot of memory here as I created 100 objects in a class but has only two nodes.

Can somebody suggest me how can I better implement this without declaring arrays? I am interested to create my own data structure not any collections.So please suggest me how can I modify above class to manage the memory in an efficient way.

Thanks in advance,
Srinivas.
15 years ago
Thank you all for quick response. I thought equals() and == are different by default. Came to know from your responses that I am wrong.

Thanks again.
15 years ago
I have the below code.





I am expecting "Both objects are equal" as the response but I am getting "unequal objects ". Can someone explain why ?

[edit]Add code tags. CR[/edit]
[ September 02, 2008: Message edited by: Campbell Ritchie ]
15 years ago
Hi ,

Thanks for reply.

My concentration is not on devices...

I just like to know if devices of different versions can communicate ???

either thru network or USB ,etc..


bye..
17 years ago
Hi ,


Can anybody help in clearing my doubt... ?

Assume I am using a device, x ,which uses older version of java which is conected to a device, y, which uses new version of java. Will they be able to communicate ???

If yes , How is it possible ???

Thanks in advance.
Srinivas.
17 years ago
Hi Everybody,

Can I know the certifications available on C language . I would be more happy if you could provide mock exam sites also.

Thanks in advance,
Srinivas.
Can any body clearly explain me what is the advantage of ORM over JDBC. I have an idea on ,how ORM works but I am not aware how JDBC works. Please explain the difference between these two .....

Thanks in advance,
Srinivas.
Thanks to all...

Srinivas
17 years ago
Hi Thanks,

I know that we have to declare the size, but I want to see what exception we get. I expected that it would ask me to declare size but instead compiler has scold me with someother exception....
C:\Documents and Settings\152749\Desktop\Srinivas\docs\JavaPrograms>javaC RUN.ja
va
RUN.java:8: '{' expected
String[] s = new String[];
^
1 error


Could you explain this ???

Thanks
17 years ago
Why "$" doesn't work ... ??? Why we have to give "[$]" ???
17 years ago
Hi ,

Can anybody explain this for me ???


import java.lang.*;

class FirstClass
{

void print()
{
String[] s = new String[];

if(s.length > 0)
System.out.println("Initialsed to some value");
else
System.out.println("Sorry failed");
}


}



class Run
{
public static void main(String argsv[])
{
FirstClass FC = new FirstClass();
FC.print();
}
}


For this code the output is :

C:\Documents and Settings\152749\Desktop\Srinivas\docs\JavaPrograms>javaC RUN.ja
va
RUN.java:8: '{' expected
String[] s = new String[];
^
1 error


Thanks in advance
Srinivas Reddy
17 years ago
Hi Mishra,

Thanks for your answer.
But I didn't get what I want exactly. I want to know what is heap(memory area). Is this the memory that JVM owns ??? or could be any part of RAM ?? . I want answer in low detail.

Thanks in advance.
17 years ago
Hi ,

I hear a word "heap" , like JVM store 2 bytes in heap etc... . What is this heap. Is this a part of RAM that JVM owns ???

Thanks in advance ..
Srinivas.
17 years ago
Hi Lynn,

Yes I agree ..... Thanks for your information.

Srinivas Reddy
18 years ago
Hi ,

Thanks for your answer.
I agree that the char takes the last two bytes from the 2's compliment value of -10 . It could be some big value like 65535 in decimals9base 10)....

Here I guess , it would do some mod operation on 65535 and then changes to some value less than 256 ,which can be printable. Am I correct.

Thanks in advance.
Srinivas Reddy
18 years ago