Click here to Skip to main content
14,877,421 members
Home / Discussions / Java
   

Java

 
AnswerRe: Netbeans Pin
Peter_in_278015-Mar-20 0:24
professionalPeter_in_278015-Mar-20 0:24 
GeneralRe: Netbeans Pin
MallardsReach15-Mar-20 1:09
MemberMallardsReach15-Mar-20 1:09 
AnswerRe: Netbeans Pin
Richard MacCutchan15-Mar-20 2:22
mveRichard MacCutchan15-Mar-20 2:22 
GeneralRe: Netbeans Pin
MallardsReach15-Mar-20 2:55
MemberMallardsReach15-Mar-20 2:55 
GeneralRe: Netbeans Pin
Richard MacCutchan15-Mar-20 3:14
mveRichard MacCutchan15-Mar-20 3:14 
GeneralRe: Netbeans Pin
MallardsReach15-Mar-20 3:35
MemberMallardsReach15-Mar-20 3:35 
GeneralRe: Netbeans Pin
Richard MacCutchan15-Mar-20 3:49
mveRichard MacCutchan15-Mar-20 3:49 
QuestionMy First Java Pin
MallardsReach12-Mar-20 10:07
MemberMallardsReach12-Mar-20 10:07 
Hi and thanks for looking,
Just started to learn Java and after reading various tutorials came up with this simple tables program.
My question, is it as it should be? I mean it works OK but is it coded correctly?

import java.util.Scanner;  // Import the Scanner class
public class MyTables {
  public static void main(String[] args) {
	int secondNum, answerNum;
	
	Scanner sc = new Scanner(System.in);  // Create a Scanner object
    System.out.println("Type a number:");
    secondNum = sc.nextInt(); // Read user input	
	
	for (int firstNum = 1; firstNum <= 12; firstNum ++) { 
	answerNum = firstNum * secondNum;
    System.out.println(firstNum + " x " + secondNum + " = " + answerNum);
	  }
	}
}

AnswerRe: My First Java Pin
Richard MacCutchan12-Mar-20 23:23
mveRichard MacCutchan12-Mar-20 23:23 
GeneralRe: My First Java Pin
MallardsReach13-Mar-20 2:59
MemberMallardsReach13-Mar-20 2:59 
Questionbooks examples of precedures stored for sqlserver Pin
Member 147683149-Mar-20 21:20
MemberMember 147683149-Mar-20 21:20 
AnswerRe: books examples of precedures stored for sqlserver Pin
Richard MacCutchan9-Mar-20 22:25
mveRichard MacCutchan9-Mar-20 22:25 
AnswerRe: books examples of precedures stored for sqlserver Pin
ZurdoDev12-Mar-20 11:03
professionalZurdoDev12-Mar-20 11:03 
QuestionPLEASE HELP JAVA Pin
Member 147599401-Mar-20 14:19
MemberMember 147599401-Mar-20 14:19 
AnswerRe: PLEASE HELP JAVA Pin
Richard MacCutchan1-Mar-20 21:36
mveRichard MacCutchan1-Mar-20 21:36 
AnswerRe: PLEASE HELP JAVA Pin
Richard MacCutchan1-Mar-20 21:42
mveRichard MacCutchan1-Mar-20 21:42 
GeneralRe: PLEASE HELP JAVA Pin
Member 1477360615-Mar-20 10:11
MemberMember 1477360615-Mar-20 10:11 
GeneralRe: PLEASE HELP JAVA Pin
Richard MacCutchan15-Mar-20 12:26
mveRichard MacCutchan15-Mar-20 12:26 
AnswerRe: PLEASE HELP JAVA Pin
MallardsReach13-Mar-20 3:12
MemberMallardsReach13-Mar-20 3:12 
GeneralRe: PLEASE HELP JAVA Pin
Richard MacCutchan13-Mar-20 4:30
mveRichard MacCutchan13-Mar-20 4:30 
GeneralRe: PLEASE HELP JAVA Pin
MallardsReach13-Mar-20 6:33
MemberMallardsReach13-Mar-20 6:33 
GeneralRe: PLEASE HELP JAVA Pin
Richard MacCutchan13-Mar-20 6:49
mveRichard MacCutchan13-Mar-20 6:49 
GeneralRe: PLEASE HELP JAVA Pin
MallardsReach13-Mar-20 7:15
MemberMallardsReach13-Mar-20 7:15 
QuestionTransfer data from SQL database to populate spinner Pin
Member 1475169121-Feb-20 5:55
MemberMember 1475169121-Feb-20 5:55 
AnswerRe: Transfer data from SQL database to populate spinner Pin
Richard MacCutchan21-Feb-20 6:10
mveRichard MacCutchan21-Feb-20 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.