|
|||
|
I dont want to make this a lengthy post so I just started to learn JAVA a few days ago so that I could have a better understanding of programming when I get out of highschool.
I was reading up on the JAVA tutorials when I neared the end of the array section. I understand everything else except at the very end when arrays are copied. Here is the code from the tutorial Java Code:
class ArrayCopyDemo {
public static void main(String[] args) {
char[] copyFrom = { 'd', 'e', 'c', 'a', 'f', 'f', 'e',
'i', 'n', 'a', 't', 'e', 'd' };
char[] copyTo = new char[7];
System.arraycopy(copyFrom, 2, copyTo, 0, 7);
System.out.println(new String(copyTo));
}
}
|
|
|||
|
Thanks for your help JAVApf. Do you know how I can increase my code time intuitiveness. I practice alot but my mind forgets alot and I cant structure code correctly all the time. thanks in advance.
|
|
||||
|
Hey Fendaril,
Its my pleasure. I know the feeling.. Its quite daunting when first starting to write Java code. It seems like there is soooo much to learn. What I would suggest is that you start your own code library. Create a folder somewhere on your computer and create .txt files containing different code. For example, I would have one containing code for reading files, reading input from the console, an array example etc. Name each file approperatly and then when you are writing new code you can check your library as a reference. The trick really is to practice. The more real world applications you can write the better. It takes time but eventually things start to click into place and it becomes alot easier. You will never stop learning. Ive been writing Java code for quite a few years now but im still learning every time I code. There is an official Java exam called the SCJP "Sun Certified Java Programmer" Take a look at some of the ebooks we have on this site. Because they are designed to help you pass the exam, they cover every aspect of Java and will help you to understand areas you are unsure about. http://www.javaprogrammingforums.com...-new-post.html Remember, google is your friend. You will find nearly all your answers there and posting in forums like this one will also help you on your way
|
|
|||
|
That e-book on JAVA really cleared up Arrays for me. To tell you the truth I thought that all arrays had to be named "anArrayOfString;". I had no clue that I could name them what I want and initialize them on the same line. Goes to show how easy it is to misread JAVA sun's tutorials.
I found this cool datatype called "Object" that can hold anything!!!!! I can even create arrays with it!!! What is the catch. Will is affect the speed of my program by alot? Last edited by Fendaril; 04-11-2008 at 02:34 PM. |
|
||||
|
I'm glad that ebook has helped you. There is lots of useful information in there!
Check this link out and read about what an Object is. What Is an Object? (The Java™ Tutorials > Learning the Java Language > Object-Oriented Programming Concepts) This is the very fundamentals of object oriented programming. Welcome to the world of Java
|
|
||||
|
Quote:
Quote:
This makes it easy to identify exactly what you are doing and makes for good programming. |
|
||||
|
Quote:
![]() How do you mean by exercises? Are you looking for inspiration in what to code or are you looking for step by step instructions you can follow? If your looking for a few simple ideas then im sure I can chuck a few your way. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.javaprogrammingforums.com/new-java/150-new-java-struggling-arrays.html
|
||||
| Posted By | For | Type | Date | |
| Java Programming Forums - JavaProgrammingForums.com | This thread | Refback | 04-11-2008 03:04 PM | |
|
100 most searched terms
Search Cloud
|
| "bad endpoint type" com.sun.xml.internal.messaging.saaj.soapexceptionimpl com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad endpoint type com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed convert arraylist to map date_format_now eclipse shortcut keys ejb3 quartz java convert double to binary java forum java forums java jtextarea bold java jtextarea color java jtextarea font java jtextarea font size java programmer forum java programmers forum java programming forum java programming forums java read last line java read last line of file java sendkeys java.security.privilegedactionexception java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad response java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed javapf javaprogrammingforums jtextarea bold jtextarea font jtextarea font color jtextarea font size programing forums programming forums reset jcombobox saaj0008 saaj0008: bad response; bad request saaj0008: bad response; not found severe: saaj0008 severe: saaj0008: bad response; bad request severe: saaj0008: bad response; not found soap java.security.privilegedactionexception soapexceptionimpl: bad endpoint type textpad java |