Click here to Skip to main content
15,907,493 members
Home / Discussions / Java
   

Java

 
AnswerRe: a problem about drools Pin
BlackWolvix21-Aug-08 0:41
BlackWolvix21-Aug-08 0:41 
AnswerResizing dynamically JTable rows with setRowHeight(int row, int height) and TableCellRenderer not working [modified] Pin
John XXIII5-Aug-08 13:42
John XXIII5-Aug-08 13:42 
QuestionScrolling Banner with message in opposite direction Pin
hisuman1004-Aug-08 19:11
hisuman1004-Aug-08 19:11 
AnswerRe: Scrolling Banner with message in opposite direction Pin
Reagan Conservative20-Aug-08 10:17
Reagan Conservative20-Aug-08 10:17 
QuestionIP Discovery protocol Pin
Smacky31131-Jul-08 6:55
Smacky31131-Jul-08 6:55 
QuestionNeed someone to test a Java application on Mac OS X Pin
MicealG29-Jul-08 8:55
MicealG29-Jul-08 8:55 
QuestionNetbeans data entry Pin
aecordoba23-Jul-08 10:44
aecordoba23-Jul-08 10:44 
AnswerRe: Netbeans data entry Pin
BlackWolvix24-Jul-08 23:29
BlackWolvix24-Jul-08 23:29 
Hi,

yep that was kinda weird or was just done for file reading. :S
btw i dunno why are you using printf if you have the easier methods which are println and print :P
however its ur decision but i find this is working XD


anyways you can use this code:

public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);

System.out.println("Enter an integer number:\n");
int intNum = in.nextInt();


System.out.println("Enter a string:\n");
//This will only read the first string aka the first name if u wish
String string1 = in.next();
//This is for the last name if you wish
String string2 = in.next();

System.out.println("------------------------------");
System.out.println("Integer number: " + intNum);
System.out.println("Cadena: " + string1 + " " + string2);
System.out.println("------------------------------");
}

}


The output:

init:
deps-jar:
compile:
run:
Enter an integer number:

1
Enter a string:

Jassim Makki
------------------------------
Integer number: 1
Cadena: Jassim Makki
------------------------------
BUILD SUCCESSFUL (total time: 6 seconds)

BlaCk WolViX

GeneralRe: Netbeans data entry Pin
aecordoba29-Jul-08 6:36
aecordoba29-Jul-08 6:36 
GeneralRe: Netbeans data entry Pin
BlackWolvix1-Aug-08 0:13
BlackWolvix1-Aug-08 0:13 
QuestionJava GUI help [modified] Pin
BlackWolvix22-Jul-08 9:17
BlackWolvix22-Jul-08 9:17 
AnswerRe: Java GUI help Pin
toxcct28-Jul-08 0:30
toxcct28-Jul-08 0:30 
GeneralRe: Java GUI help Pin
BlackWolvix28-Jul-08 4:07
BlackWolvix28-Jul-08 4:07 
QuestionPlease guide me about remote server code... Pin
ED STEVENS21-Jul-08 19:28
ED STEVENS21-Jul-08 19:28 
QuestionHow to implement ECDH in Java? Pin
Nayeem_Ctg16-Jul-08 0:20
Nayeem_Ctg16-Jul-08 0:20 
AnswerRe: How to implement ECDH in Java? Pin
toxcct28-Jul-08 0:28
toxcct28-Jul-08 0:28 
Questionreplace() Pin
thachil9-Jul-08 5:37
thachil9-Jul-08 5:37 
AnswerRe: replace() Pin
CPallini24-Jul-08 2:05
mveCPallini24-Jul-08 2:05 
Questioncreate a class toy collection that stores information about different toys in a toy shop. Pin
thewarrior_20063-Jul-08 21:36
professionalthewarrior_20063-Jul-08 21:36 
AnswerRe: create a class toy collection that stores information about different toys in a toy shop. Pin
toxcct7-Jul-08 8:25
toxcct7-Jul-08 8:25 
Questionjava run time-error Pin
annie_144330-Jun-08 10:40
annie_144330-Jun-08 10:40 
AnswerRe: java run time-error Pin
toxcct30-Jun-08 20:52
toxcct30-Jun-08 20:52 
GeneralRe: java run time-error Pin
baalaajee28-Jul-08 4:33
baalaajee28-Jul-08 4:33 
QuestionEncryption between Java and ASP.Net Pin
doWhileSomething30-Jun-08 7:23
doWhileSomething30-Jun-08 7:23 
AnswerRe: Encryption between Java and ASP.Net Pin
doWhileSomething5-Jul-08 6:26
doWhileSomething5-Jul-08 6:26 

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.