- Upvotes Received
- 8
- Posts with Upvotes
- 8
- Upvoting Members
- 6
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Java Programmer
- Interests
- Music
96 Posted Topics
Re: In a few sentence, in Java, you don't need to declare a Function first and then define it and then invoke it. You can simply define it and use it. However, if you still want to declare function, then you can use Interface, where you declare your function and then … | |
I am trying to develop an application where user will upload a file from screen, the file will be processed in server side. I am using Adobe Flex for UI, Spring 3.2 as middleware and Java 5. I can successfully upload the file and in server side can get the … | |
I have a question - how mwmory is allocated when any data structure is declared? Suppose I have declared a list as follows - List<Integer> lst = new ArrayList<Integer>(); How many bytes will be allocated for that variable or initially no memory will be allocated? Memory will be allocated when … | |
I have found a strange problem in my Ubuntu 12.04 laptop. When the machine is started, everything is working fine. But if I press the Right Shift key, the keyboard starts to work abnormally as follows - 1. All the letter keys is displayed in uppercase even if the caps … | |
* I use Remmina as remote desktop client to use my Windows 7 machine from Ubuntu 12.04 machine. It was working fine, but suddenly stopped working. Whenever I try, get the following message - **Failed to startup SSH session: Connection refused**. Then I tried with another Remote Desktop client such … | |
I have a requirement where value of one field in an object will be determined dynamically using a configurable table. For example, suppose I have the following table - Pk | Reference_column ---------------------- 1 | TAB_REF.AMOUNT where TAB_REF is a reference table and AMOUNT is one of the column of … | |
Re: Instance method - method defined in a class which is only accessable through the Object of the class are called Instance method. Method Overriding - If you extends a class and have a method in the subclass with same name and signature as of the superclass, then it is called … | |
I was trying to run a shell script and run it through Cygwin terminal in XP environment. The script I have written is as follows - [CODE]#!/bin/bash read -p "Enter Your name - " fname if test "$fname" == "abcd" then echo "Thank you abcd" fi[/CODE] When I am trying … | |
I was trying to run a shell script and run it through Cygwin terminal in XP environment. The script I have written is as follows - [CODE]#!/bin/bash read -p "Enter Your name - " fname if test "$fname" == "abcd" then echo "Thank you abcd" fi [/CODE] When I am … | |
I am trying to write a shell script which will read a file and counts the number of vowels in the file. The code which read the file is as follows - [CODE]while read -n 1 c do l=$(echo $c | tr [:upper:] [:lower:]) [[ "$l" == "a" || "$l" … | |
I have two OS in my Dell vostro laptop - Windows XP and Ubuntu 10.04. In XP, the wireless is working fine, but in Ubuntu, it is not working. I have checked the wirless driver from System -> Hardware Drivers, it is installed and is in active state. The wired … | |
I am a newbie in linux. After installing ubuntu 10.04, I tried to install google talk in linux. For this, I installed Wine and then downloaded the gtalk exe. But when I am trying to open the gtalk exe using Wine, it blocks the application with message it is not … | |
Hi, I am a new users to Linux and I am using Ubuntu 11.04. In my laptop, I have two logical drive C:\ and D:\. I have installed Windows XP in C drive and Ubuntu in D drive. From Ubuntu, I can mount the C drive and can access the … | |
I have Ubuntu 10.04 installed in my machine. I have set up audio drivers properly so that it was working fine. But when I was listening music in Youtube, it suddenly stoped working. Though the headphone is working, but the speaker is not. I have checked, all the drivers are … | |
Hi, I got a problem connecting my wirelss network from my Dell Vostro laptop. The OS is Windows XP-SP3. The network card is Dell 1394 Adapter card. When I checking the device manager, it says the device is working properly and the driver also installed. The m/c can detect all … | |
I am using Ubuntu 11.04 and using Empathy as chat client. I have added my gmail and yahoo account in the Empathy and they are working fine. I can now chat with friedns without any problem. But when I am trying to voice chat, I can't hear from friends but … | |
I am trying to write a simple servlet program. But getting the error The requested resource (/servletexam/LoginServlet) is not available. I have created two servlet classes as follows - [B]LoginServlet[/B] [CODE] public class LoginServlet extends HttpServlet { Hashtable<String,String> users = new Hashtable<String,String>(); public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, … | |
I am trying to write a simple servlet program. But getting the error [B]The requested resource (/servletexam/LoginServlet) is not available[/B]. I have created two servlet classes as follows - [B]LoginServlet[/B] [CODE] public class LoginServlet extends HttpServlet { Hashtable<String,String> users = new Hashtable<String,String>(); public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, … | |
Re: Please write down what error you are getting. | |
Re: Check the line numbers 60, 71 and 83. It should be System.out.println instead of system.out.println because in java, there is no package named system, it is System. Correct it and then check if you are still getting problem. ![]() | |
| |
Re: Go through the IO section of java, can try the following link - [url]http://download.oracle.com/javase/tutorial/essential/io/cl.html[/url] | |
Re: 1. Constructor is use to create instance of a class. In case, you want to initialize your object at the time of creation, you have to define constructor. If you don't define any constructor, the default constructor defined by Object class is used to create the instance. Hence, without constructor, … | |
Re: The problem is not clear. Could you please post sample output? Is this what your expected output is? User enter - This is a sentence. and output will be - 4. | |
Re: How do u run the program? using java command from comamnd line or using some IDE? check the classpath. It seems a classpath related problem. | |
I am writing a tiny program to learn Spring framework. My application will just print a message which is binded with the view in the server side. My jsp is as follows : [CODE] <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html> <body> <p>This is my message : ${message}</p> </body> </html> [/CODE] … | |
in my laptop, some of the key which has some functional value associated with it is not working properly. For example, if i press the 'i' key, the value displayed is 5. But if i type Fn+i, it prints i. Similarly m - 0, k - 2, l-3,u-4, p - … | |
Re: In case 1, define methods which return value. In case 2, declare some global variables and define methods that don't return values and assigns the values to those global variables. [QUOTE=Xufyan;1345081]I had an assignment to create a calculator in two ways, 1) Method returning values. 2) Method without returning values. … | |
I was trying to develop an application with Derby. I have java 6 installed in my machine. But I couldn't find any derby.jar or derbytools.jar under my java installation directory. Should I have to install it seperately? As per as I know, it installed automatically with JDK 1.6. | |
Currently, reliance icall does not support any versions of linux. Is there any way to install it in any linux versions using some bridge software or third party software? | |
Hi, I have a table, which contains multiple rows for a single set of records. It looks like - pk Value ValueType 1 123 XXXX 1 234 YYYY 1 345 ZZZZ 2 1234 XXXX 2 2341 YYYY 2 2345 ZZZZ The pk + Value + ValueType will be unique. I … | |
Re: As it is a two dimensional array, hope following code will work - [CODE]for(ChessPiece[] pie : pieces) { for(String x : pie) { if(x==chessPiece) { //other logic } } }[/CODE] I didn't try it, hope it will work. | |
Re: I guess the problem is not clear to you as well as to the viewer of the site. Please paste the exact assignment or the inputs and the output you want... [QUOTE=djbhoco;1301118]I need help with this Java program for school. I have to add loops so that each loan will … ![]() | |
Re: When you declare and assign a long variable like [CODE]long me = xxxxx[/CODE] without specifying the L in the right, it will first treat the literal as int and then upcast it to long. As the literal you used, is out of scope of int type, it gives that compilation … | |
Re: Check the arguments you passing to the acos(double) method. If the absolute value is > 1 or NaN, it will return NaN. See the API doc of Math class. | |
Re: You can take two arrays, one of the host and another for the servers and then iterate over the arrays. | |
Re: Please paste the code where you make query using Join clause. [QUOTE=palak12;1308160]Hi everyone, I will be really thankful if someone could help me out. I am developing a gui application ( based on java jdbc and oracle10g), where a user can enter queries retrieve data from that can perform selection … | |
Re: As a new programmer, always try to use braces in if statement or in loop. It is a good programming habit and it helps to debug error easily and the program is more readable. [QUOTE=javaAddict;1302778][I]jon.kiparsky[/I] has already solved your errors. Read his suggestions and your error messages. You have an … | |
Re: The replaceAll() method returns a new modified String, instead of the old String. So assign the new String to some String variable. [CODE]String a = "abcd/defg" String b = a.replaceAll("/", "\\\\");[/CODE] Now b is the modified String. [QUOTE=sawant_nitesh;1300400]1. a.replaceAll("/", "\\\\b"); 2. a.replaceAll("/", "\\\\"); Both of these could not solve my … | |
Re: What do you want to send? The path of the directory or the directory itself containing subdirectories and files? [QUOTE=raephel;1298513]how can i send a directory through a rmi[/QUOTE] | |
Re: Following SQL allows to insert multiple records at a time in database - [CODE]INSERT ALL INTO mytable (column1, column2, column3) VALUES ('val1.1', 'val1.2', 'val1.3') INTO mytable (column1, column2, column3) VALUES ('val2.1', 'val2.2', 'val2.3') INTO mytable (column1, column2, column3) VALUES ('val3.1', 'val3.2', 'val3.3') SELECT * FROM dual;[/CODE] So in java, create … | |
Re: It means in this List, you can only store objects of PdfReader or objects of any subclass of PdfReader. Other types of object can't be stored in this List. [QUOTE=yasuodancez;1301722]AKA parameterized types.[/QUOTE] | |
Re: Method hiding is same as method overriding. In some cases, it requires that the interface will be same but the implementation will be different for superclass and subclass or the superclass method is a generic method and subclass need to implement some specific implementation. In that cases, you need to … | |
Re: How it possible that first four works fine and rest getting error? If not getter found for any property, then the page will not be rendered. It seems that everything is okay. Check the spellings of getter and props. Also clear the cache and history of browser and the try. | |
Re: Is the init() method is called from main function? If yes, pass the array to that init() method. [QUOTE=Sunshineserene;1302459]I have a program with arrays declared in the main function. However, when I want to use that array in my init() function, it doesn't work. May I know what must be … | |
Re: See the mechanism, how HashMap stores key value pair internally, then it will be clear to you. When an object is put in a HashMap,it uses hashCode of the object to decide the location where the value will be stored. Also it maintains an array of keys based on hashcodes. … | |
Re: I just wan to add one point - If you define a constructor in a class, you must have to define the default constructor(without parameter) also, otherwise you will get an compilation error. [QUOTE=majestic0110;1002233]That's great, thanks for your input on this snippet. The clearer it is to others, the better![/QUOTE] | |
Re: Compile time polymorphism is as new_programmer said, method and operator overloading. Run time polymorphism is I think program to Interface over implementation. Following example will help to clear the idea - [CODE]Interface Shape { void draw(); } class Circle implements Shape { void draw() { System.out.printlbn("Drawing circle"); } } class … | |
Re: go to sun site, you will get link to download it... [QUOTE=chumky;1302214]plz help in dowload jdk1.6.0_14[/QUOTE] | |
Re: Both Kathy Sierra and Khalid Mughal are good for SCJP preparation. You can any of them. Search in Google, you will find lots of site for this preparation. Even some sites conduct free online mock exam for SCJP... [QUOTE=mayank.dyl;1301937]I m a bit confused, that which book should i choose to … |
The End.