Top.Mail.Ru
March 25th, 2004 - Java developers — LiveJournal
? ?

Java developers

March 25th, 2004

04:05 pm - restoration_me - ArrayList question.....

Hey everyone!!

I found this community because I am in some desperate need of Java help.

I'm writing a program that simulates a computer's allocation of memory through the algorithms of first fit, best fit, and worst fit. My proble though, lies within ArrayLists. I haven't used ArrayLists in awhile, and when I did, it was just for one simple Intro to Java program. So I know how to use the methods and such. However, what I am trying to do is put an object, Holes, that I have created in the ArrayList, and then invoke various methods of the Holes objects that I create. Going through the ArrayLists methods this is what I thought would work:

//Where each "size" is a different randomly genrated number
Holes hole1 = new Holes(size);
Holes hole2 = new Holes(size);
ArrayList mem = new ArrayList();

mem.add(0,hole1);
mem.add(1,hole2);

//Where "getSize()" is a method in my Holes class that just returns the value
//of the passed size of the hole
System.out.println(mem.get(0).getSize());
System.out.orintln(mem.get(1).getSize());


So why will this not display the two different sizes? Researching the various ArrayList methods, it said that "get(int)" returns an object, so why can't I invoke its method?

I hope that was clear enough! :)

Cheers!
RM

04:51 pm - karlthepagan - How to initiate RMI server-side multiplexing? Sun LIES in 1.3 docs

Sun's RMI Documentation LIES about multiplexing.

In this document http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html#firewallIn they recommend restricting a machine's listen priviledges thereby forcing it into multiplexed mode.

In this bug, http://developer.java.sun.com/developer/bugParade/bugs/4257730.html we hear about how Sun thought to obscure security problems with RMI by restricting client-initiated multiplexing.


updated...Collapse )

All the RMI proxies are either huge (j2ee app servers), or require code changes... the socket tunnel factory keeps looking easier and easier.

The people at #java on EFnet were useless, obtuse, and banned me after I put their attitude on a feedback loop :p, it reminded me of fuckyoucrew ... now I remember why I gave up on IRC.
Powered by LiveJournal.com