skip to Main Content

How can I use a variable outside while loop in java mysql

String xxx = "Select Totalpay from payments2 where committee_member = '"+memberName+"'"; pst = conn.prepareStatement(xxx); rs = pst.executeQuery(); while(rs.next()) { String totalPayment = rs.getString("TotalPay"); } table.addCell(cell); //String ttlpy = create(); table.addCell(totalPayment); I get the error at table.addCell(totalPayment): variable totalPayment may not…

VIEW QUESTION

run java between windows and ubuntu

i am running java source code on windows. Now I want it to run on Ubuntu but it doesn't work Below is the bat file on windows: @echo off color 1f title UC C:*****Javajdk1.8.0_121binjava -Xmx512m -Xms256m -Xss256k -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./oom.hprof -XX:+UnlockExperimentalVMOptions…

VIEW QUESTION
Back To Top
Search