Ty I did look it up and found that scanner is messing things up
N about naming , I didn't care to follow the rule because I was just testing things out :) I do follow the naming rule in my main...
Type: Posts; User: kukupie123
Ty I did look it up and found that scanner is messing things up
N about naming , I didn't care to follow the rule because I was just testing things out :) I do follow the naming rule in my main...
So I was trying to serialize an arraylist of object that hold names but it gives me unserializable error although implemented it in both classes too after it failed to run when i implemented it the...
So I have a string Streams in a class
and a method which requires user to enter either 1,2,3
if they enter 1 Streams=Science, if they enter 2 Streams=2, If they enter 3 Stream= what ever the user...
So I have a code
which has String "Stream" as it's main point
which has a code which means "Press 1 for science, 2 for arts,3 for others"
It works fine when user select 1 or 2 but when they select...
Thank you that helps a lot while leaving space for me to experiment myself
Can you tell me about how to read too? n search through it?
So I am working on making a code for my Aunt who is a doctor, This is what the code does
1.Asks Name
2.Asks Gender(press 1 for male, 2 for female)
3.Occupation(1-student,2-job,3-Others)
if we...
suppose
button1.setonclicklistener(){
button1.settext( "Awaiting")
}
is what I assigned first
then I assigned it to
button1.setonclicklisterner(){
button1.settext("player1 won")}
Now in my...
So i want user to input either 1 or 2
If the user enters any number greater than 2
I want it to throw an exception and print "either 1 or 2"
If the user enters a string or anything other than...
ty i will give this a try :)
--- Update ---
this actually solved it ty. Mind explaining me why it didnt work earlier
but worked when we added
TAKER.next() before adding the code to take...
Yes it crashes the 2nd time I try to use the scanner and when it crashes even when I input any integer just like it crashed when you input 4
Can you mind explaining me why? I am new to Java and...
I tried to input Integers not strings.
(int choices =TAKER.nextInt():)
I have been messing around to learn about java
and improving my simple calculator
I used a scanner Once which took doubles
And when i tried to use the Scanner again in later part of program to...
I made this code which has got two separate classes
this code is a calculator program which i am practicing on
it takes user input and then converts them into arrays
I think the user input is out...
hello thanks for the response this thread has been solved, genuinely appreciate the answers
I don't really know how to mark this thread as solved so I am just gonna leave it this way :(
Write a program which adds or subtract two number
here are condition:-
1. make a method which will add two no.
2. make a method which subtract the two no.
3. ask user if they wanna add or...
So I am trying to make my first basic calculator
my problem is in "case 2" which was suppose to subtract two numbers is adding them even though i used "-" in between them
here is the program
...
Sorry for that I am a total novice in here, I fixed it.
Would you mind explaining me how we got that output if you can and free enough to deal with my problem?
so I am a new to java and coding and doing some basic stuff please don't be hard on me if i am stupid :(
public class forloop {
public static void main(String[] args) {
int N,M;
for (N=6;...