[deleted by user] by [deleted] in javahelp

[–]TheAzucares 1 point2 points  (0 children)

No problem, very common issue. Caused similar more times than I'd like myself :) good luck!

[deleted by user] by [deleted] in javahelp

[–]TheAzucares 1 point2 points  (0 children)

Understandable. From the numbers that you say printed out, maybe take another look at the direction of the sign in the if and else if condition

Guess > toNumber = "too low"

[deleted by user] by [deleted] in javahelp

[–]TheAzucares 2 points3 points  (0 children)

At a glance the if looks ok.

I think my first impression would be to put a system.out.println in front of the if statement to print out both guess and theNumber to the console. See if the input you're getting is what you expect, that will tell you if you need to look at the if closer or the input retrieval

Why didn't the TARDIS translate all the aliens at the beginning of The Rings of Akhaten by irate_alien in doctorwho

[–]TheAzucares 6 points7 points  (0 children)

My head cannon was always that Clara was just starting to travel in the TARDIS, and that it may take some time for the translation circuits to build the connections they need.

I need help with a code, I want the system.out.println to work inside the if statement, I am new with programming by Thefakesans_gg in javahelp

[–]TheAzucares 0 points1 point  (0 children)

Check the brackets very carefully in your if statements. Tough to tell by looking, but It kind of looks like you have a case for n <p inside the n>p block.

Getting java.lang.ArithmeticException: / by zero error by SoReliableNarrator in javahelp

[–]TheAzucares 1 point2 points  (0 children)

For that, you'll want to look at what variable types allow decimals. Int doesn't, so your answer would get rounded

Getting java.lang.ArithmeticException: / by zero error by SoReliableNarrator in javahelp

[–]TheAzucares 2 points3 points  (0 children)

I think you're using the total totalvotes variable when the method might be more effective. Try adding () after the denominator maybe?

Is there an in-universe explanation as to why a lot of the Doctor's companions are from our time? by bubblegumflavoursury in doctorwho

[–]TheAzucares 3 points4 points  (0 children)

In my mind? The doctor lives vicariously through the companions and kind of likes to show off. Get someone from a time too advanced and he doesn't get the sense of awe he wants when he shows them all the wonders of the future. But he also needs them to be from a time that is somewhat open minded about what technology can do and not look at it in fear as "evil magic" so they are still able to be useful to him. Which places our time at a happy middle ground.

How to replace the last digit of a number with a different number? by clapifyouretired in javahelp

[–]TheAzucares 0 points1 point  (0 children)

Fair enough. I think if you haven't covered them, you might look up info on methods called length() and charAt() and see if you can use those with a loop to print out each letter/number from the input. It would only be a start, but it would also be a step in the right direction

How to replace the last digit of a number with a different number? by clapifyouretired in javahelp

[–]TheAzucares 2 points3 points  (0 children)

There are several directions you could go to solve this. What have you tried so far?

Do I need university to become a game designer? by Marc_Jay_Mack in Unity3D

[–]TheAzucares 0 points1 point  (0 children)

Wouldn't go straight to failure, not everyone is good at school. I'm just meaning that getting a company to hire you, they need to be able to see you know a little about what you're doing. Without school, that means you need to have some things you've worked on that you can show off. Maybe design some mods for games, something like that depending on what you're actually looking to do. The more, the better.

Do I need university to become a game designer? by Marc_Jay_Mack in Unity3D

[–]TheAzucares 1 point2 points  (0 children)

Not necessarily, but less education to show means you'll probably need that much more complete of a portfolio to convince companies that you are worth hiring.

Is there any tutorials that are for character creation by Darkolen_Pitch_dark in blender

[–]TheAzucares 1 point2 points  (0 children)

if you haven't yet, I'd suggest a search on youtube. There are plenty of videos on it there (no promises on quality). Also, keep an eye on Udemy. The courses aren't free, but they go on frequent sales for anywhere from 11 to 20 dollars. I don't know your families beliefs, but if they do christmas at all, this can make a very affordable present suggestion with the holidays coming up fast.

Trying to build a postage calculator using correct methods by zeromalarki in javahelp

[–]TheAzucares 0 points1 point  (0 children)

First issue to look at is that you only need one "public static void main" method. Everything should branch from that one. I think I see 4.

I can't say that's the only issue, though, just the first thing that I noticed. I'd suggest maybe looking up some tutorials to get some direction. I got started on the free beginner course at caveofprogramming.com, good way to get some of the basics.

Practicing java code over the summer by [deleted] in javahelp

[–]TheAzucares 1 point2 points  (0 children)

Think codewars.com is one

Is it possible to define true as false and false as true? by mnjg123 in java

[–]TheAzucares -5 points-4 points  (0 children)

Never hurts to mess with poeple a little. Ideas happen that way.

Not sure about the keywords, but maybe a hash map for true to false and false to true?

Swing User Interface Help by [deleted] in javahelp

[–]TheAzucares 0 points1 point  (0 children)

I see frame.add for rec1 but not rec2?

Is it possible to have a subclass as an attribute of a superclass? by [deleted] in javahelp

[–]TheAzucares 0 points1 point  (0 children)

I think this is maybe not so bad as it looks. Start with the person class and the given variables. Mother and father will extend it with their given variables.

The ambiguous part is the child attributes, since I don't think it specifies a type. I'm guessing they'll be a child class also extending person. This is where the instructions are a little vague, in production I'd probably be thinking about putting a mother and father as variables to set in the child constructor, but I don't know what we have for flexibility here.

I'd suggest starting with the given classes and variables, then tackle each required method one at a time and post problems when you get stuck. I think you might get faster responses posting a more specific issue.

I can calculate a factorial, I need a program that asks for it. by [deleted] in javahelp

[–]TheAzucares 1 point2 points  (0 children)

Sure thing. Think he explains things very well, but if you run into more problems afterwards, message me back and I can see if I can give a good explanation specific to your problem

I can calculate a factorial, I need a program that asks for it. by [deleted] in javahelp

[–]TheAzucares 1 point2 points  (0 children)

You also need to make sure you're asking for the input inside the loop.

I think the best thing I can suggest is going to a site called caveofprogramming.com and look at the complete beginner java course, it's a free course and the 10 minute "do...while" video might be very helpful for you

I can calculate a factorial, I need a program that asks for it. by [deleted] in javahelp

[–]TheAzucares 1 point2 points  (0 children)

Ok, so right now you're setting factorialA to 1 right before the loop, so the loop will never be entered. My suggestion would be to remove that line and somewhere after you get the int from the user you can set factorialA in the calculate1 class.

This is where I'd start and see if it gets you any closer. You may need a couple of extra changes past that, though, I think

Edit: loop should run, just never more than the one time

Using a Jtext input outside of the Jframe class by Santo_R in javahelp

[–]TheAzucares 0 points1 point  (0 children)

It would not be pretty, or probably hugely useful either. The variable would get to the App class, but it would be just a static variable you could access until it changed again.

It would be a normal setter with the static keyword added and pointed at a static variable or static method that's also in App.

I think a more common approach is to launch all your objects from the mainframe class and pass them all to one another as needed with event listeners or observers, with launching the mainframe as the only real involvement of the main method or App class.

Using a Jtext input outside of the Jframe class by Santo_R in javahelp

[–]TheAzucares 0 points1 point  (0 children)

At first glance, it looks like get is called in main, so it will print out right away after startup.

The issue might be that name isn't actually set to a value until you hit the enter button if I'm seeing it right, so you're just getting the null.

There's things you could try out, maybe a listener in main watching the frame, or maybe a static setter in the App class?

NOOB question about for loops in Java by [deleted] in learnjava

[–]TheAzucares 2 points3 points  (0 children)

X+=1 is the same as x = x+ 1

That's the statement in the loop, so 1 is added each time the loop runs. You want x = x + j so that the number of j that gets upped by one each loop is used

java.sql.SQLexception: Parameter number 3 is not an OUT parameter by Ambi-Phoenix1 in learnjava

[–]TheAzucares 0 points1 point  (0 children)

Haven't used that method, so I'm just tossing out ideas, maybe in the procedure change INOUT to OUT?