This week's book giveaway is in the Go forum.
We're giving away four copies of Head First Go and have Jay McGavren on-line!
See this thread for details.
Win a copy of Head First Go this week in the Go forum!

David R James

+ Follow
since Apr 18, 2017
David R likes ...
Android Java MySQL Database
I am currently learning Java through the Head First Book. My goal is to learn Java so I can then learn Android Development.

I really love designing user interfaces and creating assets for app ideas in Photoshop.

I am currently studying my BSc in Software Engineering.

I also have a hobby for 3D art and really love creating 3D models and texturing and bringing my creations inside game engines.
United Kingdom
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David R James

Hi Guys,

I am struggling to learn and keep things retained. I am looking for some advice on what methods of learning has worked for you guys and if it has paid off?

I am learning from a book Head First Java, the book is great as well but I am starting to lose focus and taking long breaks in between reading the book and actually coding some Java. How do you guys learn, what is your methods and has it paid off? Do you feel learning Java is a "full time" thing? How do you remember all this stuff and how do you comprehend/understand some of the topics that need to be learnt?

My goal to learning Java is to be able to make Android apps through Android Studio. I'm slowly learning the design side of it as I do dabble in graphic design and I use Adobe Illustrator to draw graphics but I am getting caught up in questions like how do I get my graphics into my Android app? How would I prepare my graphics for animation? Do I include text in my graphics or would it be best to just use Text Views to include the text in my buttons etc?

This leads me to the problem of going back and fourth between learning Java and learning the design side of Android applications (looking for answers to the questions above).

I feel like I'm jumping back and fourth and spending too much time away from learning Java because I'm focusing on trying to search for answers to my above questions for the design side of things.

I know a lot of people may come back and say just learn one but I am very proficient with Illustrator and drawing graphics its just I'm getting caught up in asking questions like the ones above.

How would you guys deal with this in terms of learning, where would you spend your time? Do you guys do both graphic design and coding? Is this manageable?

I'm going to study Software Engineering at University and whilst we won't be learning Java, Android Development is kind of a hobby of mine and it's something that I would love to know how to do.

Thanks for the help and sorry for the long post, I'm getting slightly frustrated with making no progress in terms of getting things done in Android Studio, all I have at the moment is a complete concept for an app and a mock up with the actual design of my graphics:

1 year ago

João Victor Gomes wrote:Maybe you should try to decrease the x value and print the hyphen before printing the last letter (d).

That solved it!

Thanks so much, this was really confusing me, all I had to do was print the hyphen before printing the last letter!

The output is now:

a-b c-d
1 year ago
@Campbell Ritchie. Hey thanks for the advice!

I have tried moving the code snippet:

I've moved it outside of the while loop and tried it in all 3 if loops (it didn't really make sense to put it in there but I tried it anyway) and I still can't seem to get rid of that last hyphen.

@Campbell Ritchie. Yep there is only supposed to be two hyphens, one between the a and b and another between the c and d.

I did step through the code to get the value of x on each loop through the while loop and it all sounds logical to me, I really don't know why that last hyphen is there
1 year ago
Hi Guys,

I am slowly making my way through the Head First Java book. I've already solved 2 problems (totally hyped!) but I now have an exercise which I am really scratching my head about.

The exercise is called 'Code Magnets' and I have 7 snippets of code:

I have to put these 7 snippets of code in the right order. There are some curly braces missing in some code snippets just to add to the challenge.

The goal is to get the output:

a-b c-d

Here is my code that I have written:

My output is this:

a-b c-d-

For some reason I have an extra hyphen on the end of my output and I can't seem to figure out why. I have checked over the code a few times now and it seems the more I read and process the logic of it the more I start to slowly spiral into confusion.

As far as I can see there isn't any other way to order the code snippets without having a while loop paradox and I'm scared I might break the very fabric of space and time if that happens.

Any help is greatly appreciated!
1 year ago
Yay I am making progress! You guys are awesome

There was a few syntax issues with the first code snippet but it's all working now.

@Dave Toll. Thanks very much for the "cd Desktop" command.

@John Joe. Big thanks for catching those sneaky errors

Thanks all for the nice welcome, it's a great community here!
1 year ago

Dave Tolls wrote:The easiest fix is to cd to the Desktop from your command prompt.
From where you are at the moment that's simply 'cd Desktop'.
Then your original java command should work (assuming the file name is correct).

You will get other errors, but at least they will be compilation ones.

Thanks Dave, this fixed the issue I can now run the file with "javac"!
1 year ago
Hi Guys,

I am trying to run my first app which I have created in Notepad on Windows 10. I am reading the Head First Java book which encourages you to stay away from IDE's until the end of the book (I intent to use Android Studio). I have set up the JRE and the JDK and I have my simple first app:

I am launching cmd on Windows 10 and typing "javac" but I am getting an error saying:

javac: file not found:
Usage: javac <options> <source files>
use -help for a list of possible options

The file is on my Desktop and I have tried:

C:\Users\devda>javac -cp C:/Users/devda/Desktop
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options

I can't seem to get it to find and compile the .java file.

Just wondering where I'm going wrong.

1 year ago
@Campbell Ritchie. When I run java -version I do get the HotSpot version at the end too, I didn't copy and paste properly in my last post lol.

I get a version when I use "javac -version" too (it's javac 1.8.0_102) so it looks like it's there but the "% javac" command still doesn't seem to work
1 year ago
Hi guys,

Thanks very much for the quick replies!

@Rajith Pemabandu. When I type java -version in cmd it comes back with java -version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)".

That is the correct version I installed.

@Paul Clapham. In the book where there is a section called "Setting Up Java" and in there its telling me to type "% javac" in cmd so the terminal knows where to find the javac compiler.
1 year ago

I am new here. I found out about this site through the Head First Java book. I am currently installing Java on to my machine in order to follow along with the book and learn Java but I am having some issues with installing. I am running Windows 10 and I am starting my command prompt and typing the command "% javac" but I am getting back '%' is not recognized as an internal or external command, operable program or batch file. I have installed the Java SDK and JRE in a Java folder on my D drive. I'm not to sure if I have done something wrong, I have been learning Android Studio and believe to have everything set up correctly because I have been able to compile in Android Studio with no issues. I also have my PATH environment variable set up and point to the SDK bin directory on my D drive within my Java folder.

Just looking for some help


1 year ago