Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!

Al Hobbs

Ranch Hand
+ Follow
since Aug 30, 2017
Al likes ...
Netbeans IDE
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
13
Received in last 30 days
0
Total given
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Al Hobbs

I think it's good to just think of objects like a set of code that is separated from the main code so that you can use it later.

In your post you had a program that printed out two chairs and a table.  If you were to make that into objects you could have an object that would print from a string, list, or a file and then instead of having a program that prints only chairs and tables, you'd have a program that can print whatever text you give it.
1 month ago
You should probably find resources in your native language.  Just search java and jsp on google.
1 month ago
Do you have tests or done debugging?
1 month ago
Out of memory error seems like that would have to do with the actual hardware on your computer hence the error part.
1 month ago
Goodjob  sounds good.  You are using onPreferncechanged to detect the change?
1 month ago
Ok so if want to make a web app you arent going to be getting input using the console.  I think make you should read up on basic jsp and servlet first.
1 month ago
Actually....... you have java code slapped in an html page... No wonder it doesn't work. 
1 month ago
This question isn't even about cookies and tokens.  It's about Httpsession.  Where did you get these questions from then?
1 month ago
Do you have both versions on your computer and then you are changing your environment variables?
1 month ago
Are you sure this isn't your homework?  I find it hard to believe you are thinking up all these diverse questions so quickly. Maybe they're from a book or your teacher? FESS UP.
1 month ago
Cookies are saved on a browser.  When you use tokens, that's used when the server and client are separated.  For example,  if there's an android app that connects to a server, they will use the token to send with the request to a secured endpoint.
1 month ago
Also, if you change your settings nothing happens to the amount of balls in the mygdxgame.java.  The only time that class gets the number of balls is when it's first created.
1 month ago
How about you just restart the activity/wallpaper after saving the preferences? You need the thing that actually uses the number of balls to make the screen to restart with the new number. It looks like according to your onPreferenceChange(), which i'm assuming you want to do the changing part, only changes a static variable.
1 month ago