- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
4 Posted Topics
I'll go for Java ( easy to identify errors when coding ) I'll leave Assembly for focusing with Java :lol: ( reason of unintelligent n' lazy student ). Anyways, I am new to Java programming this school year.
Howdy:) luckily found this IT community site and expecting to have fun participating to this forum. I'm an IT student normally having some troubles with Java ( here I go ) I think it is only fair to tell you that I love things related to ITechy. Anyways, I'm glad …
System.out.println("Name is: " + name + " Age is: " + age + "Nationality is:" + nationality[B][COLOR="Red"]);[/COLOR][/B] ); I've try your codes it runs error free
[CODE]import javax.swing.JOptionPane; public class PossitiveNegative{ public static void main(String[]args){ int N1, N2, product, PoNoN1, PoNoN2; String N1Str, N2Str, productStr, OutputPoNoN; N1Str=JOptionPane.showInputDialog("Enter a number :"); N1=Integer.parseInt(N1Str); N2Str=JOptionPane.showInputDialog("Enter another number :"); N2=Integer.parseInt(N2Str); product=N1*N2; if (N1>0) PoNoN1=N1+"(POSITIVE)"; else if (N1<0) PoNoN1=N1+"(NEGATIVE)"; else PoNoN1="(NEUTRAL)"; if (N2>0) PoNoN2=N2+"(POSITIVE)"; else if (N2<0) PoNoN2=N2+"(NEGATIVE)"; else PoNoN2="(NEUTRAL)"; if …
The End.