- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
Which Computer Language would you like to know more about, or even start to learn? | |
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 … | |
Re:
just trying to create a person(or two) using name, age and nationality but its giving me illegal start of expression error // **************************************************************** // Person.java // // Person class with two constructors // *************************************************************** public class Person { private String name; private int age; private String nationality; // ------------------------------------------------------------ // … | |
[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 … |