0
In my code is there a way to create a password that prints a mixture of upper and lowercase letters using the methods i wrote?
I tried something at the bottom of my code on line 125, I don't know if I was in the right track or not. https://code.sololearn.com/c126hCzRL0sB/?ref=app
52 Answers
+ 1
I know my way of learning is that I code based on what I know and when I run into a problem I ask for help and when they return the code I research based on what was fixed or completed in my code that's what I'm going to do with the code u helped me with, also thanks for helping me with my code. :)
+ 1
I will, in the future I'll look for resources online to give me a better understanding so I can learn what is challenging me and learn them 100% and be able to use them in various codes.
+ 1
I as well like to look at the trending codes for help and I'll save them and look back at them when ever I need extra help, its always sort of helped and i sometimes even end up teaching myself something new to.
+ 1
fixed it now I just need to change the first switch statement so just the 'random case' case recognizes it I was thinking of either using public or private or methods to make this happen.
0
@john wells can you please help me I really need your help
0
this is my number text me WhatsApp please
+254720649231
0
@John Wells I am confused on how the edit you wrote in my code works just so I can get a better understanding of it could you explain it? Some of the stuff you added was new to me and I tried researching it but I couldn't find anything.
0
there is something important you to show me please
0
here's a list of questions:
•line 126 - I don't understand what it does or why we need it
•128 - to me it looks like this is where it separates the letters into capital to lower case in the outcome like this, AzBh, correct me if I'm wrong though
•129 - I understand what the += opperater does with int, I'm just curious of how it works with strings instead.
help would be much appricated
0
on line 130 what if we wanted to input more than 2 methods in the 'Letters' case would we have to change it to this and add another else statement with another 'Password.sayNumbers'? if(cc%3 == 0)
0
Random sounds good but how would I do it, my thought was to use arrays but I don't know if that's the most efficient way or not.
0
I'd get random positions before loop. Within loop see if you reached them. If so, call the selected function. If nor, get a random and call that function.
u=random.nextInt(n);
l=random.nextInt(n);
for (int i = 0; i < n; i++) {
if (i == u)
s += ?.sayUppercase();
else if (i == l)
s += ?.sayLowercase();
else {
var r = random.nextInt(2);
if (r == 0)
s += ?.sayUppercase();
else
s += ?.sayLowercase();
}
}
0
what does the ? mean in java?
0
I'm sitting car waiting for daughter to get off work and didn't lookup your code so I couldn't remember your class name or variables.
0
There is a ? operator, but that wasn't what I meant.
0
oh I was just curious because I saw it in one of the comments above u posted about a code and ive never seen it before.
0
interesting I'll have to give it a go in a code one of these times.
0
I see is it tought in a solo learn course?
0
I'll have to take a look around oracle looks like it has some useful info on there thanks for showing me this.
0
@ jalen can you help me out please