What's a good resource place for android/java? I'm writing an app (my first ever, it's a basic calculator) and I got the XML down but I'm 50/50 with Java, are there any good resources? (because there's all these things that the device can do and I don't know what or how to use them)
[editline]18th January 2015[/editline]
is there anything that says
'Public means...
Static means...
Void means...
Global means..
'
it tells you what the main things are and what they mean and what they can do, so I can go off that and use all the different things with the code
or am i going abotu this totally wrong
[editline]18th January 2015[/editline]
also this is my first time doing any real programming
the only other real programming i've ever done was lua (and doubtt that even counts that much, it was in computercraft a mod for minecraft)
It's been many years since I've used Java, but there are a lot of parallels to C++, so I'll answer what I can.
[B][U]public[/U] [/B]means that function can be called from outside that class by anything, in contrast with [B][U]Protected[/U][/B] that can only be called from within the class
Functions have the option to return a value to the thing that called it, like performing a calculation and returning the value for example. If you don't want the function to return anything, it is [B][U]void[/U][/B]. Void can be replaced by anything, like int, bool, string, or even custom classes depending on what you want to return.
Lets say I have a function like:
[CODE]public int doThing()
{
return 99;
}
[/CODE]
And somewhere, like perhaps within my [I]main[/I] method, I have a line like:
[CODE]
public static void main()
{
int myNumber = doThing()
}
[/CODE]
Then myNumber will equal 99;
I forget the specifics of static and global.
I [B][U]HIGHLY[/U][/B] recommend using [URL="http://stackoverflow.com/"]STACKOVERFLOW[/URL]. Search up on there your programming related questions. I use it all the time. If you cant find an answer, make an account. I've been using it for years.
Google can also be your friend.
Don't forget to try out the programming section here.
I've never studied or read any textbooks for any programming language. Once I learned the basics back in high school, I self taught myself the rest. If there was something I was unsure of, I just Googled it.
When it comes to programming, you will really learn by doing. So messing around, getting stuck, and trying to figure out how to do things is encouraged.
Sorry, you need to Log In to post a reply to this thread.