Click here to Skip to main content
15,563,721 members
Home / Discussions / Java
   

Java

 
AnswerRe: using firefox progmatically with java Pin
Richard MacCutchan3-Jul-17 4:22
mveRichard MacCutchan3-Jul-17 4:22 
Questionjava.net.SocketException: Software caused connection abort: socket write error Pin
Django_Untaken1-Jul-17 10:57
Django_Untaken1-Jul-17 10:57 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Richard MacCutchan1-Jul-17 21:53
mveRichard MacCutchan1-Jul-17 21:53 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Django_Untaken2-Jul-17 0:39
Django_Untaken2-Jul-17 0:39 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Richard MacCutchan2-Jul-17 2:37
mveRichard MacCutchan2-Jul-17 2:37 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Django_Untaken2-Jul-17 8:33
Django_Untaken2-Jul-17 8:33 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Richard MacCutchan3-Jul-17 4:23
mveRichard MacCutchan3-Jul-17 4:23 
QuestionInput:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
Member 1327696824-Jun-17 8:52
Member 1327696824-Jun-17 8:52 
THIS IS MY CODE BUT IT IS NOT GIVING THE RIGHT OUTPUT
package main;
import java.util.*;

public class Year_Conversion {
	public static void main(String[] args) {
		String s1;
		System.out.println("Input string in the following format dd-mm-yy:");
		Scanner sc=new Scanner(System.in) ;
		s1=sc.next();
		convertDate(s1);
	}
	public static String convertDate(String s1)
	{
		String ans = null;
		String[] parts=s1.split("-"); 
		int d=Integer.parseInt(parts[0]);
		int m=Integer.parseInt(parts[1]);
		int y=Integer.parseInt(parts[2]);
		if(d<10)
		{
			ans=ans+"0"+d;
		}
		else
		{
			ans=ans+d;
		}
		if(m<10)
		{
			ans=ans+"0"+m;
		}
		else
		{
			ans=ans+m;
		}
		ans=ans+"19"+y;
		return ans;
	}
}

AnswerRe: Input:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
Michael_Davies24-Jun-17 9:42
Michael_Davies24-Jun-17 9:42 
SuggestionRe: Input:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
Richard Deeming26-Jun-17 1:46
mveRichard Deeming26-Jun-17 1:46 
AnswerRe: Input:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
jschell28-Jun-17 7:16
jschell28-Jun-17 7:16 
QuestionHow should I go about getting the generated key from one DAOImpl to another DAOImpl ? Pin
karengsh18-Jun-17 6:30
karengsh18-Jun-17 6:30 
AnswerRe: How should I go about getting the generated key from one DAOImpl to another DAOImpl ? Pin
Mike.F.Hewitt18-Jun-17 12:14
Mike.F.Hewitt18-Jun-17 12:14 
GeneralRe: How should I go about getting the generated key from one DAOImpl to another DAOImpl ? Pin
karengsh23-Jun-17 22:34
karengsh23-Jun-17 22:34 
QuestionJava Pin
Member 1326557218-Jun-17 2:38
Member 1326557218-Jun-17 2:38 
JokeRe: Java Pin
Richard MacCutchan18-Jun-17 23:53
mveRichard MacCutchan18-Jun-17 23:53 
JokeRe: Java Pin
John C Rayan19-Jun-17 5:16
professionalJohn C Rayan19-Jun-17 5:16 
GeneralRe: Java Pin
Richard MacCutchan19-Jun-17 5:23
mveRichard MacCutchan19-Jun-17 5:23 
QuestionWhere to place connection using servlet Pin
digibat13-Jun-17 18:18
digibat13-Jun-17 18:18 
AnswerRe: Where to place connection using servlet Pin
Richard MacCutchan13-Jun-17 22:42
mveRichard MacCutchan13-Jun-17 22:42 
QuestionAndroid jetplayer Pin
Member 132447819-Jun-17 20:24
Member 132447819-Jun-17 20:24 
AnswerRe: Android jetplayer Pin
Richard MacCutchan9-Jun-17 23:11
mveRichard MacCutchan9-Jun-17 23:11 
Questionsimple and basic Array Question Pin
Member 125938658-Jun-17 18:37
Member 125938658-Jun-17 18:37 
AnswerRe: simple and basic Array Question Pin
Richard MacCutchan8-Jun-17 23:09
mveRichard MacCutchan8-Jun-17 23:09 
GeneralRe: simple and basic Array Question Pin
Member 125938659-Jun-17 2:57
Member 125938659-Jun-17 2:57 

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.