Search:

Type: Posts; User: jean28

Page 1 of 3 1 2 3

Search: Search took 0.09 seconds.

  1. Re: How to get the fractional part of this number without so much precision?

    Then is there a way that I can extract the fractional part away from that double? My main objective is, if I have an imported double variable with any value, say 3.45, then somehow get a variable...
  2. How to get the fractional part of this number without so much precision?

    Hey guys,

    I have a number type double and want to split it up into its integer and fractional parts. For example, if I have 3.45 i want a variable that has 3 and another one that has 45.

    I...
  3. Replies
    3
    Views
    1,180

    Java Calendar printing wrong Time Zone?

    Hey guys,

    I am trying to create a simple java program that prints out the date that was submitted. I started playing around and noticed that the Calendar class prints exactly what I want....
  4. Replies
    5
    Views
    3,054

    Re: Adding polynomials in an ArrayList?

    It is okay. I already got it :)


    @Override
    public Polynomial add(Polynomial P2)
    {
    PolynomialImp P3 = new PolynomialImp();

    for(Term t: P2)
    {
  5. Replies
    5
    Views
    3,054

    Re: Adding polynomials in an ArrayList?

    I did that loop that you wrote here:


    for(int i = 0; i <= this.terms.size() - 1; i++)
    {
    if(this.terms.get(i).getExponent() >= 0)
    {
    P3.addTerm(new...
  6. Replies
    5
    Views
    3,054

    Adding polynomials in an ArrayList?

    I have an ArrayList terms with various polynomial terms inside. This is what is inside:



    So there are 4 elements inside the array. Each one has their own coefficient and exponent.

    I want to...
  7. Replies
    1
    Views
    1,228

    Implementing a good .equals method?

    I am making a programming project that implements terms for polynomials. For example, if I put "7x^3+4x^2", then the class has an inner array list that stores "7x^3" and "4x^2". However, I need to...
  8. Replies
    1
    Views
    1,071

    ArrayList remove() implementation problem?

    Hey guys I wanted to know if someone could tell me what I'm doing wrong here. I need to implement the methods of an ArrayList, and I was doing great until I had to implement the remove() method.
    ...
  9. Replies
    1
    Views
    1,179

    Accessing the location manager of a device?

    Hey guys. I've searched everywhere trying to make a small application that returns my current localization. Ideally I would like to see it in Google maps, but latitude and longitude would do. I have...
  10. Re: Array that tests if any elements repeat themselves

    I think that this one should work, but for some reason it doesn't. Does anything clear seem wrong now again?


    public static boolean isDifferent(float[] array)
    {
    float temp;
    boolean count...
  11. Re: Array that tests if any elements repeat themselves

    I tried to do another for loop but this one always gives me false (reasonable, considering that if I loops through it I will always find the value that I stored in temp. How do I fix this?
  12. Re: Array that tests if any elements repeat themselves

    I put array.length - 2 and it worked :) thanks.
  13. Array that tests if any elements repeat themselves

    Hey guys, I am trying to write a program that takes an array of float values and determines if all the numbers are different for each other. I am trying to set a temp variable that stores the value...
  14. Replies
    6
    Views
    1,321

    Re: For vs. For Each loops?

    In my class the professor was showing us a "Bag" program that he was writing and it was a collection. He told us that a way to be able to iterate the Bag program was to put a subclass called...
  15. Replies
    6
    Views
    1,321

    Re: For vs. For Each loops?

    So I will always need to implement the iterator interface if I am making my own collection?
  16. Replies
    6
    Views
    1,321

    For vs. For Each loops?

    I am a bit new to for each loops and I'm trying to understand what are the main differences between them when working with arrays. Is there any particular set where the for each is more convenient?...
  17. Replies
    1
    Views
    1,390

    How to export a Java program?

    How can I make a java program that is an .exe file that runs without opening Eclipse? Does anybody know?

    Thanks very much.
  18. Replies
    3
    Views
    1,877

    Help creating an AVD

    Hey guys. I am new to Android and I was trying to make a new AVD in eclipse but for some reason the program wont let me do it. I have already installed countless Android SDK's (from 3.0 to 4.2) but...
  19. Thread: finally clause

    by jean28
    Replies
    2
    Views
    1,553

    Re: finally clause

    What about that variable "reader" ? What can I do with it?
  20. Replies
    1
    Views
    1,251

    Abstract Classes?

    Could anyone explain to me the use of an abstract class and why I would prefer them over an interface?

    As far as I understand, both contain empty method declarations, except that you can implement...
  21. Thread: finally clause

    by jean28
    Replies
    2
    Views
    1,553

    finally clause

    Hey guys, I have a few doubts about the finally clause in exception handling.

    What exactly does it do? Does it need to have try and catch blocks before it in order to work?

    I just can't seem...
  22. Re: Instance Variable does't work in extended class?

    Thanks a lot guys, for some reason the program ran just fine after I saved it for some reason...
  23. Instance Variable does't work in extended class?

    Hey guys, I have a super class and a class that extends it. For some reason, the variable cur doesn't work in the extended class even though it should work just fine. The errors are in the...
  24. Replies
    2
    Views
    1,072

    Re: The += assignment operator?

    Thank you very much!
  25. Replies
    2
    Views
    1,072

    The += assignment operator?

    Hey guys I have a quick question. Could anyone explain to me what the += does and how it works? I have seen it in different examples that use arrays but I still don't get what it's supposed to do.
    ...
Results 1 to 25 of 68
Page 1 of 3 1 2 3