Click here to Skip to main content
15,888,461 members
Home / Discussions / Java
   

Java

 
Questionjavacode for read csv file without using jquery,jdbc,sql Pin
Member 1394487210-Aug-18 0:58
Member 1394487210-Aug-18 0:58 
QuestionRe: javacode for read csv file without using jquery,jdbc,sql Pin
Richard MacCutchan12-Aug-18 21:00
mveRichard MacCutchan12-Aug-18 21:00 
QuestionNew to this forum Pin
Member 1392578425-Jul-18 13:01
Member 1392578425-Jul-18 13:01 
AnswerRe: New to this forum Pin
Richard MacCutchan25-Jul-18 21:19
mveRichard MacCutchan25-Jul-18 21:19 
QuestionHelp to pick a career route Pin
Алексей Кузнецов15-Jul-18 21:10
Алексей Кузнецов15-Jul-18 21:10 
AnswerRe: Help to pick a career route Pin
Richard MacCutchan16-Jul-18 2:12
mveRichard MacCutchan16-Jul-18 2:12 
AnswerRe: Help to pick a career route Pin
jschell28-Jul-18 7:09
jschell28-Jul-18 7:09 
QuestionI'm trying to right justify my integers but it isn't working Pin
Member 1297423514-Jul-18 6:09
Member 1297423514-Jul-18 6:09 
I have four simple computations in my program. All integer results. I want the output to be right justified but it ain't looking that way.

Right now the 5 underneath the 30 looks like it's being placed between the 3 and the 0 (in the above number 30). The -10 looks like it is being correctly right justified. The -10 looks like it is being correctly right justified with the 30. And the 200 takes up the maximum field width of 3 which I have set.

My output has a ragged right appearance so I don't know where I'm going wrong.

My code looks like this:

public class FormattingOutput
{
	public static void main(String args[])
	{
		
		int a, b, c, d;
		
		a = 10 + 20;
		b = 10 - 5;
		c = 10 - 20;
		d = 10 * 20;
		
		System.out.printf("%3d%n", a);
		System.out.printf("%3d%n", b);
		System.out.printf("%3d%n", c);
		System.out.printf("%3d", d);
	}
}

AnswerRe: I'm trying to right justify my integers but it isn't working Pin
Member 1297423514-Jul-18 7:44
Member 1297423514-Jul-18 7:44 
AnswerRe: I'm trying to right justify my integers but it isn't working Pin
Member 1361589620-Jul-18 22:11
Member 1361589620-Jul-18 22:11 
QuestionProblems with creating an uber jar Pin
Member 1390999412-Jul-18 21:13
Member 1390999412-Jul-18 21:13 
AnswerRe: Problems with creating an uber jar Pin
Richard MacCutchan13-Jul-18 5:55
mveRichard MacCutchan13-Jul-18 5:55 
AnswerRe: Problems with creating an uber jar Pin
jschell16-Jul-18 16:08
jschell16-Jul-18 16:08 
QuestionI need help with my java programing project. Pin
Member 139046799-Jul-18 11:16
Member 139046799-Jul-18 11:16 
AnswerRe: I need help with my java programing project. Pin
Richard MacCutchan9-Jul-18 19:54
mveRichard MacCutchan9-Jul-18 19:54 
QuestionRuntime polymorphism or dynamic methode dispatch Pin
DimaMatr2-Jul-18 7:01
DimaMatr2-Jul-18 7:01 
AnswerRe: Runtime polymorphism or dynamic methode dispatch Pin
Maciej Los2-Jul-18 21:21
mveMaciej Los2-Jul-18 21:21 
QuestionAndroid Studio Pin
Member 138939501-Jul-18 1:22
Member 138939501-Jul-18 1:22 
AnswerRe: Android Studio Pin
Richard MacCutchan1-Jul-18 21:39
mveRichard MacCutchan1-Jul-18 21:39 
QuestionBest way to interpolate? Pin
Anthony Pierson26-Jun-18 18:08
Anthony Pierson26-Jun-18 18:08 
QuestionMessage Closed Pin
18-Jun-18 14:02
Member 1387734218-Jun-18 14:02 
QuestionQuestion On Android Studio On NetBook Computer Pin
C-P-User-312-Jun-18 21:51
C-P-User-312-Jun-18 21:51 
AnswerRe: Question On Android Studio On NetBook Computer Pin
Richard MacCutchan12-Jun-18 22:02
mveRichard MacCutchan12-Jun-18 22:02 
GeneralRe: Question On Android Studio On NetBook Computer Pin
C-P-User-313-Jun-18 16:39
C-P-User-313-Jun-18 16:39 
QuestionGuide me in right direction to learn Java Card Pin
Member 1386083711-Jun-18 19:44
Member 1386083711-Jun-18 19:44 

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.