Click here to Skip to main content
14,429,446 members
   

Java

 
Questionjavacode for read csv file without using jquery,jdbc,sql Pin
Member 1394487210-Aug-18 1:58
MemberMember 1394487210-Aug-18 1:58 
QuestionRe: javacode for read csv file without using jquery,jdbc,sql Pin
Richard MacCutchan12-Aug-18 22:00
communityengineerRichard MacCutchan12-Aug-18 22:00 
QuestionNew to this forum Pin
Member 1392578425-Jul-18 14:01
MemberMember 1392578425-Jul-18 14:01 
AnswerRe: New to this forum Pin
Richard MacCutchan25-Jul-18 22:19
communityengineerRichard MacCutchan25-Jul-18 22:19 
QuestionHelp to pick a career route Pin
Алексей Кузнецов15-Jul-18 22:10
MemberАлексей Кузнецов15-Jul-18 22:10 
AnswerRe: Help to pick a career route Pin
Richard MacCutchan16-Jul-18 3:12
communityengineerRichard MacCutchan16-Jul-18 3:12 
AnswerRe: Help to pick a career route Pin
jschell28-Jul-18 8:09
Memberjschell28-Jul-18 8:09 
QuestionI'm trying to right justify my integers but it isn't working Pin
Member 1297423514-Jul-18 7:09
MemberMember 1297423514-Jul-18 7: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 8:44
MemberMember 1297423514-Jul-18 8:44 
AnswerRe: I'm trying to right justify my integers but it isn't working Pin
Member 1361589620-Jul-18 23:11
MemberMember 1361589620-Jul-18 23:11 
QuestionProblems with creating an uber jar Pin
Member 1390999412-Jul-18 22:13
MemberMember 1390999412-Jul-18 22:13 
AnswerRe: Problems with creating an uber jar Pin
Richard MacCutchan13-Jul-18 6:55
communityengineerRichard MacCutchan13-Jul-18 6:55 
AnswerRe: Problems with creating an uber jar Pin
jschell16-Jul-18 17:08
Memberjschell16-Jul-18 17:08 
QuestionI need help with my java programing project. Pin
Member 139046799-Jul-18 12:16
MemberMember 139046799-Jul-18 12:16 
AnswerRe: I need help with my java programing project. Pin
Richard MacCutchan9-Jul-18 20:54
communityengineerRichard MacCutchan9-Jul-18 20:54 
AnswerMessage Closed Pin
19-Jul-18 7:05
Memberjohn parker19-Jul-18 7:05 
QuestionRuntime polymorphism or dynamic methode dispatch Pin
DimaMatr2-Jul-18 8:01
MemberDimaMatr2-Jul-18 8:01 
AnswerRe: Runtime polymorphism or dynamic methode dispatch Pin
Maciej Los2-Jul-18 22:21
mveMaciej Los2-Jul-18 22:21 
QuestionAndroid Studio Pin
Member 138939501-Jul-18 2:22
MemberMember 138939501-Jul-18 2:22 
AnswerRe: Android Studio Pin
Richard MacCutchan1-Jul-18 22:39
communityengineerRichard MacCutchan1-Jul-18 22:39 
QuestionBest way to interpolate? Pin
Anthony Pierson26-Jun-18 19:08
MemberAnthony Pierson26-Jun-18 19:08 
QuestionQuestion On Android Studio On NetBook Computer Pin
C-P-User-312-Jun-18 22:51
MemberC-P-User-312-Jun-18 22:51 
AnswerRe: Question On Android Studio On NetBook Computer Pin
Richard MacCutchan12-Jun-18 23:02
communityengineerRichard MacCutchan12-Jun-18 23:02 
GeneralRe: Question On Android Studio On NetBook Computer Pin
C-P-User-313-Jun-18 17:39
MemberC-P-User-313-Jun-18 17:39 
QuestionGuide me in right direction to learn Java Card Pin
Member 1386083711-Jun-18 20:44
MemberMember 1386083711-Jun-18 20: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.