[java programming] DTO & DAO

2009-07-30 Thread Radhika . K
Can, anyone explain the differences between DTO and DAO. It would be better if explained with an example. Thanks & Regards, Radhika.K --~--~-~--~~~---~--~~ To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this g

[java programming] Re: Problem with objects, references and identity

2009-07-30 Thread Babu Rajendran
Hi Rita, I believe all the wrapper classes are immutable too. If you look at the JavaDoc for the Integer class you can see that the class is final. So it is immutable. public final class *Integer*extends Number implements Comparable > Regards, Babu On Thu, Jul 30, 2009 at 8:26 PM, RPGoldie w

[java programming] Re: Problem with objects, references and identity

2009-07-30 Thread Eric Cai
Hi Rita, In Example 2, I search the Integer.java for the answer. When you are using autoboxing (just like Line 026) , you will get a new Integer object in fact. So when you use "==" for compare the reference, it will not true. But be caution, the implement of autoboxing mechanism in the source

[java programming] Re: Exercise 1034

2009-07-30 Thread Romulo Estrera
here's a good guide for Java programming, i learned fast here: http://www.leepoint.net/notes-java/index.html On Fri, Jul 31, 2009 at 1:03 AM, ben wrote: > > hi all > > i want to know how to read and compare values in while loop > > thanks > ben. > > > > --~--~-~--~~~--

[java programming] Lab1007

2009-07-30 Thread JKid314159
Dear Java Programmer:   Here hex is a string.  A 10 is entered into the JOption pane.  This is recognized as a character of '1' and '0'.   //This comes into this method and the length of 2 makes //a one dimensional array of 2 with the values [0],[1]. int intEq[] = new int[hex.length()]; //hex.le

[java programming] Extrange result in lab 1108 exercise 1

2009-07-30 Thread Alfredo Torres
Hi all, I write the server side project and the client side project as described in hands on lab but when i run the instances of ConnectionClient i get in the server side this: run: Listening for connections... Connection 1, started [1]: This is a message from ConnectionClient instance 1 about

[java programming] Re: Classpath does not work as expected

2009-07-30 Thread JKid314159
HI;   Your instructions to bring up the classpath at my command prompt did not work.    I used this instead:   echo %PATH% echo %CLASSPATH%   This worked for my system? Respects, JKid314159 http://groups.google.com/group/existentialist-reading-circle?hl=en     --- On Thu, 7/30/09, DaveB wrote

[java programming] Re: Exercise 1034

2009-07-30 Thread Ashok A V
Hi Ben, Start from here : http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html If you have any trouble let me know. Thanks, Ashok A V On Thu, Jul 30, 2009 at 10:33 PM, ben wrote: > > hi all > > i want to know how to read and compare values in while loop > > thanks > ben. > > >

[java programming] Re: Lab 1038 - Command Line Arguments

2009-07-30 Thread Babu Rajendran
Hi Pedro, For your queries.. 1. It is not mandatory that the ages are between 3 and 6. It's your choice. The number of family members to take into account for average age calculation can be between 3 and 6. For example, if you take 4 members of a family, say, A, B, C and D with the ages 6, 10, 12

[java programming] Exercise 1034

2009-07-30 Thread ben
hi all i want to know how to read and compare values in while loop thanks ben. --~--~-~--~~~---~--~~ To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion-unsubsc

[java programming] Re: Exercise 1: Build and run Java programs that use Java array of int

2009-07-30 Thread David Seto
Thanks gpatynek I replaced my loop with your triple loop. I now get this message - Operator + cannot be applied to java.lang,String, k cannot find symbol symbol : variable k location: class threedimensional cannot find symbol symbol : variable k location: class threedimensional It's complaining

[java programming] Re: Lab 1038 - Command Line Arguments

2009-07-30 Thread Dasarathy Raghavan
Pedro, Lets say you want 4 names and ages in the format name1 age1 name2 age2 name3 age3 name4 age4, you could pass them as arguments into your code ... see below. This code does the folllowing: verifies if the total number of arguments passed is 8 initialize variables to store the values of args

[java programming] Lab 1038 - Command Line Arguments

2009-07-30 Thread pedro oliveira
Hi, I have some questions regarding the Homework exercise of Lab - 1038. 1 - Regarding numbers of ages, is it mandatory for the program to check if the ages passed as command-line arguments are between 3 and 6, or is a programmer's choice? Because that is a problem when making the average, if

[java programming] Problem with objects, references and identity

2009-07-30 Thread RPGoldie
Hi all, I encountered a problem when working with Integer objects which I would like to be discussed. Let me first show you my class: 001 public class Test { 002 003 int memberVar; 004 005 public static void main(String[] args) { 006 007 // Example 1 008 Test t1 = new Tes

[java programming] Attention when casting int/double!

2009-07-30 Thread RPGoldie
Hi all, I just want to point out an interesting fact when casting int values. In pdf document "Working with built-in Java classes", page48, it says: int numInt1 = 1; int numInt2 = 2; //result is implicitly casted to type double double numDouble = numInt1/numInt2; We might expect tha

[java programming] Re: Classpath does not work as expected

2009-07-30 Thread shadow_hunt3r
Nice tip, thank you oSKAR. This was a problem I was going through too. shadow_hunt3r. On 30 jul, 10:41, oSKAR wrote: > Hi David: > > Go to "Computer" then right click choose "properties" select "Advanced .." > select "Environment variables" at bottom > > then click  "new" > > in the fields: > >

[java programming] Re: Java_array :cannot proceed further to get first names

2009-07-30 Thread Eric Cai
import javax.swing.JOptionPane; public class TestSplit { /** * @param args the command line arguments */ public static void main(String[] args) { int i; int totalnames = 3; String name = ""; for (i = 0; i < totalnames; i++) { name += JOptionPane.showInputDialog("Enter f

[java programming] Re: Classpath does not work as expected

2009-07-30 Thread oSKAR
Hi David: Go to "Computer" then right click choose "properties" select "Advanced .." select "Environment variables" at bottom then click "new" in the fields: Variable name: CLASSPATH Variable Value: %CLASSPATH%;C:\Documents and Settings\Dave\My Documents\MyJava Now you are ready to operate

[java programming] Re: Classpath does not work as expected

2009-07-30 Thread DaveB
All: Due to help from BlackRookSix and Pacior, the mystery of CLASSPATH is resolved. I hope that this will help others. If there is ANY value in your CLASSPATH variable, you CANNOT use Set CLASSPATH=[new directorypath] by itself. BlackRookSix suggested using echo %CLASSPATH% to obtain the curren

[java programming] Re: Memory allocation

2009-07-30 Thread Nirmal Kumar
Hi, Heap is a part of RAM. Check this: http://wiki.answers.com/Q/Whether_java_heap_exist_in_hard_disk_or_ram \\\/// / \ | \\ // | ( | (.) (.) |) --o00o--(_)--o00o--- Stand up,be bold,be strong. Take the whole

[java programming] Re: Java_array :cannot proceed further to get first names

2009-07-30 Thread Ashok A V
import javax.swing.JOptionPane; public class TestSplit { /** * @param args the command line arguments */ public static void main(String[] args) { int i; int totalnames=3; String[] name ={"",

[java programming] Re: Java_array :cannot proceed further to get first names

2009-07-30 Thread Diogo Sales Oliveira
Follow the class more carefully, check the examples. And check the String API for split() method devika shukla wrote: > In the program given below > I want to get the First names of persons but I am unable to get > please help me to proceede > Also please tell me the concept of "split() instanc

[java programming] Re: Lab 1036 Exercise 1

2009-07-30 Thread Diogo Sales Oliveira
You should know that you should not be embarrassed, we're here to help, and rookies to come will expect you to help them :) Hugs David Seto wrote: > > This is embarrassing I can’t even figure out to modify the original > MyJavaArrayProject. > > When I ran the program all I get is successful bu

[java programming] Java_array :cannot proceed further to get first names

2009-07-30 Thread devika shukla
In the program given below I want to get the First names of persons but I am unable to get please help me to proceede Also please tell me the concept of "split() instance (non-static) method" How does it works? import javax.swing.JOptionPane;/* * To change this template, choose Tools | Templa

[java programming] Re: Memory allocation

2009-07-30 Thread Diogo Sales Oliveira
Hi there, I hope I'm wrong on this, but I think that: 1) Memory allocation is a runtime task. By default, the JVM does nothing in compile time about choosing memory addresses or such. 2) Since everything is ran from inside a Virtual Machine, consider only the Java heap space. Of course at som

[java programming] Re: Lab 10-10

2009-07-30 Thread Diogo Sales Oliveira
Hi Mahmoud, Indeed you should try read the api, on the methods used in the code, to figure out what each line does. But there is a minor catch in this code: // set a property through setProperty() method p.setProperty("myKey1", "myValue1"); Yet, the expected output in the end doesn't have this

[java programming] Re: Homework 1111 java generics

2009-07-30 Thread Ashok A V
Hi Torres, You cannot extend but you can always convert from String to Long. Lets look at a code sample here : public class TestConversion { public static void main(String[] args) { String number = "10"; Long convertlong; convertlo

[java programming] Re: Lab1007

2009-07-30 Thread Ashok A V
More in formation on formatting can be found @ http://www.java2s.com/Tutorial/Java/0120__Development/UsingJavasprintfMethod.htm Quite helpful .. Thanks, Ashok A V On Thu, Jul 30, 2009 at 6:42 AM, Lucas Rhodes wrote: > %s is called a format specifier. Look for a description of that in whatever >