Click here to Skip to main content
15,890,982 members
Home / Discussions / Java
   

Java

 
SuggestionRe: Jbuilder visual class Pin
Richard MacCutchan5-Sep-13 22:17
mveRichard MacCutchan5-Sep-13 22:17 
Questionwant to join a group Pin
Samrat Pyaraka5-Sep-13 6:09
professionalSamrat Pyaraka5-Sep-13 6:09 
AnswerRe: want to join a group Pin
Richard MacCutchan5-Sep-13 22:11
mveRichard MacCutchan5-Sep-13 22:11 
QuestionCounting Blank Lines Pin
thesuhnin4-Sep-13 20:55
thesuhnin4-Sep-13 20:55 
AnswerRe: Counting Blank Lines Pin
Richard MacCutchan4-Sep-13 21:14
mveRichard MacCutchan4-Sep-13 21:14 
QuestionInheritance,connection object. Pin
chdboy4-Sep-13 17:47
chdboy4-Sep-13 17:47 
AnswerRe: Inheritance,connection object. Pin
Richard MacCutchan4-Sep-13 21:13
mveRichard MacCutchan4-Sep-13 21:13 
AnswerRe: Inheritance,connection object. Pin
linaast18-Sep-13 21:11
linaast18-Sep-13 21:11 
Java
public class ConClass
{
  public Connection con = null;

  // constructor to initialize con.
  public ConClass(DataSource ds){
   try{
    con = ds.getConnection();
   } catch(SqlException ex){
    System.out.println(ex.getMessage());
   }
  }
  // the con to get.
  public Connection getCon(){
   return con;
  }
}

public class SaveData
{
  private Connection con = null;

  public void save(ConClass cObj){
   if(con == null){
    con = cObj.getCon();
   }
   // do whatever and use whenever you want your con in this class.
  }
}

QuestionHow to edit the files in a system which is remotely located.? Pin
cooldharma064-Sep-13 0:06
cooldharma064-Sep-13 0:06 
AnswerRe: How to edit the files in a system which is remotely located.? Pin
Richard MacCutchan4-Sep-13 4:58
mveRichard MacCutchan4-Sep-13 4:58 
AnswerRe: How to edit the files in a system which is remotely located.? Pin
Member 102526704-Sep-13 5:07
Member 102526704-Sep-13 5:07 
AnswerRe: How to edit the files in a system which is remotely located.? Pin
jschell4-Sep-13 12:11
jschell4-Sep-13 12:11 
GeneralRe: How to edit the files in a system which is remotely located.? Pin
Member 102526704-Sep-13 13:38
Member 102526704-Sep-13 13:38 
AnswerRe: How to edit the files in a system which is remotely located.? Pin
Eternal algorithm7-Sep-13 8:54
professionalEternal algorithm7-Sep-13 8:54 
AnswerRe: How to edit the files in a system which is remotely located.? Pin
cooldharma069-Sep-13 19:06
cooldharma069-Sep-13 19:06 
QuestionHow to reduce Gap between two radio button component in Mig Layout? Pin
chdboy31-Aug-13 18:59
chdboy31-Aug-13 18:59 
AnswerRe: How to reduce Gap between two radio button component in Mig Layout? Pin
Richard MacCutchan3-Sep-13 22:31
mveRichard MacCutchan3-Sep-13 22:31 
QuestionCrack down on software piracy Pin
Member 1023726429-Aug-13 21:22
Member 1023726429-Aug-13 21:22 
AnswerRe: Crack down on software piracy Pin
jschell30-Aug-13 14:07
jschell30-Aug-13 14:07 
QuestionMiglayout,label center align? Pin
chdboy28-Aug-13 17:33
chdboy28-Aug-13 17:33 
QuestionCross Platform GUI Development Pin
Don Guy28-Aug-13 10:01
Don Guy28-Aug-13 10:01 
AnswerRe: Cross Platform GUI Development Pin
jschell29-Aug-13 11:13
jschell29-Aug-13 11:13 
AnswerRe: Cross Platform GUI Development Pin
Richard MacCutchan29-Aug-13 21:15
mveRichard MacCutchan29-Aug-13 21:15 
GeneralSeeking Android Developer to Port Application! Pin
cdenczek27-Aug-13 9:03
cdenczek27-Aug-13 9:03 
GeneralRe: Seeking Android Developer to Port Application! Pin
Richard MacCutchan27-Aug-13 20:37
mveRichard MacCutchan27-Aug-13 20:37 

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.