Skip to content

Tag: java

How to write in pre tag?

I can’t write value to field using Selenium .sendKeys. So I use jsCode: and I can’t understand why these methods don’t work – the test passes but the value is not written to the field $(“div pre”).append(“RESPONSE”) – work in devTools Full html code: Answe…

Stripe – Radar Rules

Hope you are doing well. I am going through the following documentation of Stripe “https://stripe.com/docs/radar/radar-session”. In the following page it is mentioned We have to create Radar session at client side and send it your server and after that we have to send from server to stripe. So my …

Shuffle a string via swapping content to different index

I have an assignment in which we are instructed to create a method which takes a string, scrambles the content of the string, and then returns the scrambled string (ie “Hello” returns “elloH”). However, we are only allowed to do this via loops and basic string functions (no arrays can …

Looping a 2 player rock paper scissors game (Java)

im trying to create a 2 player rock paper scissors game with a prompt to continue or end the game. and also re-ask for your move if entered incorrectly. i’ve been trying to use do-while loops but i get an error every time. it doesn’t recognize the do-while i put in, because it’s not reading …

What is the space complexity of this snippet?

Hi I’m a CS student and I’m trying to get a better understanding of Big O notation and was hoping somebody could explain this to me. Does this have complexity O(1) or O(n)? In my full program this snippet is inside a method, with String str being passed to it. I do not understand if it is O(n) bec…