Muhammad Safwat

Greenhorn
+ Follow
since Aug 12, 2008
thejavacode.com
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Muhammad Safwat

Congratulations for your success
8 years ago

the following is an illegal syntax



That is why it is not permitted to extend from multiple classes but you can implement multiple interfaces
8 years ago
please post the output of running this code
8 years ago

Jesper Young wrote:There are some important things to note with the solutions given above:

Garrett's solution, with Arrays.asList() is efficient because it doesn't need to copy the content of the array. This method returns a List that is a "view" onto the array - a wrapper that makes the array look like a list. When you change an element in the list, the element in the original array is also changed. Note that the list is fixed size - if you try to add elements to the list, you'll get an exception.

Ernest's solution: new ArrayList(Arrays.asList(myArray)); copies the content of the array to a new ArrayList. The copy is ofcourse independent of the array, and you can add, remove etc. elements as you like.

Janarthan's solution, with Collections.addAll(myList, myStringArray); is essentially the same as Ernest's solution.

If you only need read access to the array as if it is a List and you don't want to add or remove elements from the list, then use Garrett's solution. Otherwise use Ernest's or Janarthan's solution.


Very good analysis and you need to add also that copying the array affects the performance of your code so if performance is an issue then user the Arrays.asList() way
8 years ago
I believe user threads are enabled by default in WAS 5
not sure about netbeans
Hi Ranchers
I found this simple and beautiful EJB3 tutorials for those who are starting to use EJB 3
http://www.thejavacode.com/enterprise-java-beans-3-tutorial-t9721.html
Have fun
if you are asking on how to upload multiple files in the same time there is no control in jsp that allow this
10 years ago
JSP
remmember to set the error attribute in the target jsp to true
10 years ago
Class loader only loads classes not property files
10 years ago
The synchronized keyword is added to ensure that it will only be accessed by just one thread at a time

by default the servlet is not thread safe
10 years ago