Search Results

Showing results 1 to 40 of 597
Search took 0.22 seconds.
Search: Posts Made By: ~s.o.s~ ; Forum: Java and child forums
Forum: Java 4 Days Ago
Replies: 12
Solved: SQLIte and Java
Views: 519
Posted By ~s.o.s~
IMO, if you are planning to work both in embedded and server modes, Derby would be a good choice for a beginner database. It supports almost all SQL features which you might need along with support...
Forum: Java 4 Days Ago
Replies: 12
Solved: SQLIte and Java
Views: 519
Posted By ~s.o.s~
> How I go about getting documentantion?

Any JDBC tutorial out there should be good enough to get you started. The only difference would be the way the SQL driver is loaded. This ...
Forum: Java 4 Days Ago
Replies: 12
Solved: SQLIte and Java
Views: 519
Posted By ~s.o.s~
> I don't understand what you mean by type 4

http://java.sun.com/products/jdbc/driverdesc.html
http://www.javaworld.com/jw-07-2000/jw-0707-jdbc.html
Forum: Java 4 Days Ago
Replies: 1
Views: 146
Posted By ~s.o.s~
Seems to be a problem with the way your query is created; what's the JDBC type of `patientNo'? Is it a VARCHAR? If yes, then you need to wrap the passed in patient number in single quotes when...
Forum: Java 6 Days Ago
Replies: 1
Views: 141
Posted By ~s.o.s~
You might want to take a look at an open source browser in java called Lobo (http://lobobrowser.org/java-browser.jsp). Though it has a limited rendering capabilities when compared to browsers like...
Forum: Java 6 Days Ago
Replies: 3
Views: 202
Posted By ~s.o.s~
> Why use abstract classes at all? Why not just declare a class and
> then make sure you never instantiate any variables of that type?

...because compile time checks are far superior/efficient...
Forum: Java 9 Days Ago
Replies: 2
Views: 212
Posted By ~s.o.s~
You can either modify the properties of the command window [cmd] to show more than 500 lines [ALT + SPACE + P -> Screen Buffer Size -> Height] or pipe the output of your java program to some text...
Forum: Java 9 Days Ago
Replies: 1
Views: 229
Posted By ~s.o.s~
Are both the class files present in the same "policy" directory? The physical directory structure which holds your .class files needs to reflect your package hierarchy. Read the sticky post at the...
Forum: Java 9 Days Ago
Replies: 1
Views: 157
Posted By ~s.o.s~
I'd assume that you are having problems viewing the output of your program, yes? In that case reading this (http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html) might help. Also,...
Forum: Java 16 Days Ago
Replies: 8
Views: 430
Posted By ~s.o.s~
> So what I need to know to be Java expert in Web and Desktop
> Applications?

Apart from the points already mentioned, I'd like to stress on reading good books/code. I've seen people churn out...
Forum: Java 19 Days Ago
Replies: 8
Views: 268
Posted By ~s.o.s~
Try using the DocumentBuilderFactory instead of explicitly instantiating the parser.public static void main(String args[]) throws Exception {
DocumentBuilder builder =...
Forum: Java 22 Days Ago
Replies: 5
Views: 242
Posted By ~s.o.s~
> Did not solve the problem

You sure? The same piece of code works for me. BTW, what kind of process is writing to this file of yours? Another Java process? Which JDK version are you using? I...
Forum: Java 22 Days Ago
Replies: 2
Views: 290
Posted By ~s.o.s~
NumberFormat is an abstract class; use its static factory method to get your choice of number formatter.public class MainTest {

public static void main(String args[]) throws Exception {
...
Forum: Java 22 Days Ago
Replies: 5
Views: 242
Posted By ~s.o.s~
Try using the RandomAccessFile in read mode.
public class MainTest {

public static void main(String args[]) throws Exception {
RandomAccessFile in = new RandomAccessFile("file.txt",...
Forum: Java 23 Days Ago
Replies: 2
Views: 396
Posted By ~s.o.s~
The commas and the brackets are a part of the ArrayList class's toString() implementation. If you need your own row representation, either write your own method which does so or better yet, create a...
Forum: Java 26 Days Ago
Replies: 3
Views: 287
Posted By ~s.o.s~
> So some kind of loop is needed

...which is what I have in my previous reply. Re-read my previous reply and try implementing that with the code you currently have. Just make sure you put all...
Forum: Java 26 Days Ago
Replies: 20
Views: 593
Posted By ~s.o.s~
Use getValues().nextLine().equals("n") instead. The Scanner name is confusing BTW, just name it scanner instead of getValues which is more appropriate for a method name.
Forum: Java 26 Days Ago
Replies: 20
Views: 593
Posted By ~s.o.s~
You are comparing a Scanner object with a String object.
Forum: Java 26 Days Ago
Replies: 5
Views: 508
Posted By ~s.o.s~
The problem is with this line firstcube = static double pow(double first, double 3); which is invalid. When invoking methods, you don't need to specify the method modifiers along with their parameter...
Forum: Java 26 Days Ago
Replies: 5
Views: 293
Posted By ~s.o.s~
Oh and BTW, once you are done with understanding how web services work, try splitting your logic in layers like the business[model] layer, database[persistence] layer etc. Database access from a web...
Forum: Java 26 Days Ago
Replies: 3
Views: 287
Posted By ~s.o.s~
Assuming both the files have the same number of lines i.e. a salt for each string, you need to keep reading the data from your readers till the readLine() method returns null. Something like:...
Forum: Java 34 Days Ago
Replies: 2
Views: 259
Posted By ~s.o.s~
> If re-direction must occur, it must be the first line of a constructor. Why?

To ensure that the parent class is completely initialized before it gets used in the child class's constructor body....
Forum: Java Nov 16th, 2009
Replies: 16
Solved: Append to array
Views: 1,020
Posted By ~s.o.s~
What's wrong with the getTime() method of the Date class which returns the number of milliseconds elapsed since January 1970 as long? To get the seconds, just divide by 1000.
Forum: Java Nov 15th, 2009
Replies: 5
Views: 622
Posted By ~s.o.s~
> Why is it that even when i specify the index to go to it still returns -1 ?

It's not returning -1; the exception says that you can specifying an array index [-1 in your case] which is out of...
Forum: Java Nov 15th, 2009
Replies: 16
Solved: Append to array
Views: 1,020
Posted By ~s.o.s~
> is it possible to loop through the contents of two arrays to populate a
> third array with the combined content?

In my code I'm using looping through two Lists and populating a third list...
Forum: Java Nov 15th, 2009
Replies: 16
Solved: Append to array
Views: 1,020
Posted By ~s.o.s~
Sadly, this simple a thing becomes pretty clunky to implement when it comes to Java. A sample implementation might be something like:
class YourClass {

private static final List<String>...
Forum: Java Nov 14th, 2009
Replies: 5
Views: 622
Posted By ~s.o.s~
You'd typically look-up the item of interest and then perform the necessary operations on it rather than setting a particular item of the ArrayList. A better implementation here would be have your...
Forum: Java Nov 14th, 2009
Replies: 16
Solved: Append to array
Views: 1,020
Posted By ~s.o.s~
> Does anybody know how I can append to the array

You can't. The best you can do is perform a copy-on-write if the content to be written is more than the initial capacity with which the array was...
Forum: Java Oct 21st, 2009
Replies: 6
Views: 388
Posted By ~s.o.s~
> Thank you - my understanding of generic types is still somewhat limited.

When in doubt, always look at the standard library code which comes prepackaged with the JDK. For e.g. in this case,...
Forum: Java Oct 21st, 2009
Replies: 6
Views: 388
Posted By ~s.o.s~
IMO, though the analysis is correct, the solution provided isn't because an Iterator over a collection of elements of type E isn't the same as an Iterator over a collection of elements of type F...
Forum: Java Oct 21st, 2009
Replies: 4
Views: 307
Posted By ~s.o.s~
> Could that why the created it as an object?

There is absolutely no valid reason as to why a Boolean object needs to be created if one already exists and is ready to use i.e. considering that a...
Forum: Java Oct 21st, 2009
Replies: 4
Views: 307
Posted By ~s.o.s~
> data[i][k + 1] = new Boolean(false);

Better yet; data[i][k + 1] = Boolean.FALSE. Same result, no unnecessary object creation.
Forum: Java Oct 21st, 2009
Replies: 2
Views: 235
Posted By ~s.o.s~
> Can anyone help? help

Check if the Client class has a no-arg constructor in case you have explicitly provided a overloaded constructor. Also, looking at the error message gives an indication...
Forum: Java Oct 21st, 2009
Replies: 5
Views: 408
Posted By ~s.o.s~
> By number of characters l mean not punctuation or a space

Look into the isLetter method of the Character class; modify your logic to increment the count only if the above method returns true.
Forum: Java Oct 10th, 2009
Replies: 3
Views: 319
Posted By ~s.o.s~
> You don't need to do the conversion to int and back; just send the
> double in text format and parseDouble(...) at the Java end.

I don't think that would handle values like +INF, -INF and NaN...
Forum: Java Oct 5th, 2009
Replies: 4
Solved: Business Apps
Views: 3,394
Posted By ~s.o.s~
There are many good books, blog posts and articles out there for getting started with JEE; your best bet would be the free JEE 5 tutorial (http://java.sun.com/javaee/5/docs/tutorial/doc/)hosted by...
Forum: Java Oct 2nd, 2009
Replies: 2
Views: 343
Posted By ~s.o.s~
JNI would be too low level; try something like SWIG (http://www.swig.org/)or JNA (https://jna.dev.java.net/).
Forum: Java Oct 2nd, 2009
Replies: 4
Solved: Business Apps
Views: 3,394
Posted By ~s.o.s~
> also, would this be something to do with JavaEE instead of JavaSE?

Depends on what you need to learn and where your expertise lies, but yeah, nowadays the core business functionality *is*...
Forum: Java Oct 1st, 2009
Replies: 2
Views: 177
Posted By ~s.o.s~
> The local memory is not reconciled with the main memory

This might be because of each Thread is having a cached copy of your data; using the volatile...
Forum: Java Sep 24th, 2009
Replies: 1
Views: 231
Posted By ~s.o.s~
AFAICT, there is no such method which does that. BTW, why would you want such a method? Why not just manipulate the source array first and then add it to the ByteBuffer?
Showing results 1 to 40 of 597

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC