• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error cannot find symbol Object Array  RSS feed

 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi am trying to create a car object array with the following code but get an error that "cannot find symbol car". Am i creating my object array correctly? why am I getting this error?

 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
error that "cannot find symbol car"

Is that the actual text of the error message?  I don't see a car class in the code. I do see a Car class.  Java is case sensitive so car is not the same as Car.

I assume you typed the text of the message (bad practice because of possible errors) and that the real message was for a class named Car.
Also the line number where the error is located is missing.  That helps with solving problems. 

Copying the full text of the error message and pasting it here is better the typing just part of the message.

Where is the definition for the Car class?  The compiler can not find it.

Am i creating my object array correctly?

Yes, it looks ok, bur the compiler should be the one to ask.
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

if I remove the word Car and replace it with Object as in the code below, i don't have any errors but if i change the word from object to any word i get this error below(shown after the code):




java.lang.NoClassDefFoundError: Car
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getMethod0(Class.java:2856)
at java.lang.Class.getMethod(Class.java:1668)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: Car
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error is saying that it can't find the class files for the Car class.

Did that class compile correctly?

[EDIT: Just noticed that you are using packages. Can you also show us ... the directory structure of where the files are located? From where (directory), and how are you compiling and running your application? and the classpath, if set?]

Henry
 
Campbell Ritchie
Marshal
Posts: 56520
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:. . . [EDIT: Just noticed that you are using packages. . . .
You shou‍ld regard the package name as part of the code; had you included it in the first post, or put the opening [code=java] tag before the package name, it would have made that problem so much easier to find.
Content minimized. Click to view
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

thought it might be my system settings

tried running code using an online compiler and still gets this error below:

/tmp/java_TtJiqI/TrafficQueue.java:6: error: cannot find symbol
private Car [] carArray;
        ^
  symbol:   class Car
  location: class TrafficQueue
/tmp/java_TtJiqI/TrafficQueue.java:16: error: cannot find symbol
public void add(Car car){
                ^
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the Car.class located?  It needs to be on the classpath so the compiler can find it.
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

maybe the way am presenting the code might be the issue.
I am trying to create an array of car objects

so basically came up with this code:

?

then tried initializing it like this:

    ?

 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the issue. 

The problem is the compiler can not find a definition for the Car class.

Is there a definition for the Car class?

You can simply create a Car class by adding this line to your source:

create an array of car objects 

Your code will create an array that can hold Car objects, but it will be empty.  The Car objects will need to be added to the array.
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

OK this works when I add the statement
private class Car {} ; // define an empty Car class
as shown below:

Does this mean I have to create an empty Class each time am creating an object Array or only when the compiler cannot find the definition?


 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you trying to create an array of Car objects?  What are the Car objects supposed to do? 

Making an empty class so the compiler can find a definition of the Car class is a temporary thing to allow the code to compile without errors.  Some time you will need to define a real Car class that does what you want.
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you trying to create an array of Car objects?  What are the Car objects supposed to do? 


Am trying to create an array of car objects which i can add and remove cars from. I would also like to check if this array is full or empty.

using the guidance provided so far this is where I have reached, but i get an error when implementing my add method using the object created as shown below:



run:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: trafficqueue.TrafficQueue.add
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You wrote:

But the call to this method is written like this:

On line 25, you are trying to pass a String to the add method. You declared that the argument to add() should be a Car object.  A String object is not a Car object so the Java compiler doesn't match your call on line 25 to the method declared on line 14. Therefore, it's basically asking you, "What the heck you talkin' about, Willis?"
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Ok Did a compile and came with this error

Compiling 1 source file
: error: method add in class TrafficQueue cannot be applied to given types;
        queueLane1.add("Red Chevrolet");
  required: TrafficQueue.Car
  found: String
  reason: actual argument String cannot be converted to TrafficQueue.Car by method invocation conversion
1 error

obviously its got to do with adding a string instead of a car object  as advised.
So how do I go about this using my code?
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benjamin Rollins wrote:So how do I go about this using my code?

Well, if you go to a restaurant and tell the waitress you want a Coke and she comes back and gives you a piece of cake and you say, "No, I asked for a Coke, not Cake" what do you think the waitress should do?

And just in case the analogy isn't clear, here's how they're the same: Your add() method says it wants a Car, you go and try to give it a String, the compiler complains, "The add() method wants a Car." What should you do?
 
Benjamin Rollins
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if you go to a restaurant and tell the waitress you want a Coke and she comes back and gives you a piece of cake and you say, "No, I asked for a Coke, not Cake"


Well I will speak to the experienced "Bartenders" politely to see if they could help me

That gave me a very good idea however this is the best i could come up with:



this seems to work even though I wish I could understand why I was not able to follow on with my original code to be able to do this and how I could have modified that previous code to work .
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benjamin Rollins wrote:
Well I will speak to the experienced "Bartenders" politely to see if they could help me

Thank you for being a sport. Understand that some of us bartenders can get grumpy when the customers keep coming back with the same questions and we try to help them but they just can't seem to be able to help themselves no matter how many times we try. It can get quite frustrating, as you might imagine.

Are you really not getting what's wrong with your line 25? Do you understand that a String object IS NOT a Car object and therefore it is illegal to try to call your add(Car) method that way?

You have written this on line 24:

Do you understand what you're doing there? What you need to do to fix your program is VERY similar to what you're doing on line 24.
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps it's the fact that the String you're trying to pass has the value of "Red Chevrolet".  Just because YOU know that a "Red Chevrolet" is a kind of car, that doesn't mean that the computer sees it that way.  You could just as well have written this:

and you would get the same error.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benjamin Rollins wrote:
this seems to work even though I wish I could understand why I was not able to follow on with my original code to be able to do this and how I could have modified that previous code to work .


This code is *not* doing what you think it is doing. First, you are declaring a Car generic, which is not the same as the Car class that you defined. In other words, you are not using your Car class.

And then, you are *not* using the generic -- you are using a raw type. So, you are not using a generic either.

And finally, raw generics uses Object types (due to type erasure) ... so, no Car class, no Generics, just Objects, which works with Strings.

Henry
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benjamin Rollins wrote:That gave me a very good idea however this is the best i could come up with:


this seems to work

No, what you did on line 8 there is a regression from what you had before. It's a VERY BAD idea.  I'm not sure what makes you say that it seems to work but whatever it is you're seeing, it's an illusion.
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, I didn't even notice that OP added a generic type Car there. Good catch, Henry.

Benjamin, you're way over your head with that generic stuff. Don't attempt to use that stuff yet. You're still a toddler and generics are like a loaded gun. Put it down and slowly back away from it, kid.
 
Cooper Gates
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benjamin,

What are you trying to accomplish with the Car class?
So far, you are simply attempting to store a string, such as
“Red Chevrolet”.

Note that on line 2, if you want to create an array of
instances of cars, without them being null, the syntax would be:

private Car carArray[] = new Car[numberOfcarsInQueue];
// Note – initialize the number you're passing in as the size of the array
private int numberOfcarsInQueue = 10; // Just an example

// You now have ten “cars,” but what really is a Car class? You haven't
given it members, such as that name you wanted (Red Chevrolet), or
a release date, price, etc. etc.

In line 8, notice that your Car class can't be a super class of Object. In other words,
any Object is not necessarily a car. If you cast from a spawned object (new Object)
into a Car, you are guaranteed to get a null.

You could rewrite that constructor:

public TrafficQueue(int numberOfCars) {
carArray = new Car[numberOfCars];
} // Of course, initially declaring the array of cars now doesn't need the size,
// it could just be

private Car carArray[];
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Cooper: Welcome to the Ranch!

I'd like to point out a few misstatements in your reply:

Note that on line 2, if you want to create an array of
instances of cars, without them being null, the syntax would be:

private Car carArray[] = new Car[numberOfcarsInQueue];

An array initialized like that actually will have all of its elements set to null. Reference type fields are assigned a value of null by default. With an array field declared that way, it will be sized to numberOfcarsInQueue elements but each element will be assigned the default reference value of null. If you don't want the array elements to be null, you have to explicitly assign each element a non-null value.

In line 8, notice that your Car class can't be a super class of Object.

*Nothing* can be a super class of Object. All other objects are subclasses of java.lang.Object

In other words, any Object is not necessarily a car. If you cast from a spawned object (new Object)
into a Car, you are guaranteed to get a null.

If you take an object that's not actually a Car and try to cast it as a Car, this will *not* guarantee a null. What it will do is cause a ClassCastException at runtime.
 
Cooper Gates
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Junilu!

private Car carArray[] = new Car[10];
// Sure, the "new" is not like using the constructor of Car, so it doesn't give it non-null values.
It does allocate memory for all 10 objects (cars), correct?

I have written a lot of Java, but haven't done class casting since UnrealScript.
Let's say Pawn extends actor, and you cast into Pawn from some actor that isn't a Pawn.
The cast returns None, but doesn't throw an error, so that's what I'm used to.
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cooper Gates wrote:
private Car carArray[] = new Car[10];
// Sure, the "new" is not like using the constructor of Car, so it doesn't give it non-null values.
It does allocate memory for all 10 objects (cars), correct?

Correct. This expression will be true:  (carArray.length == 10) && (carArray[0] == null)
and likewise if you use carArray[1] to carArray[9] instead.

I have written a lot of Java, but haven't done class casting since UnrealScript.
Let's say Pawn extends actor, and you cast into Pawn from some actor that isn't a Pawn.
The cast returns None, but doesn't throw an error, so that's what I'm used to.

No. Like I said, in Java, an illegal cast like that will produce a ClassCastException at runtime. Try it.

Also, it's kind of misleading to say "cast into" -- a cast will never change the actual runtime type of an object. There is no mechanism in Java to change an object's runtime type. A cast is merely changing the way you "see" an object.  It's like putting a different colored filter over your glasses. Your glasses don't change the world, only your perception of the world when viewed through the filter. It's more appropriate to say "cast X as a Y".

Consider this code:

The cast on line 12 is necessary because otherwise, the code would not compile. The compiler does not remember that an instance of Bar had just been assigned to the foo reference, so you have to give a "guarantee" to the compiler (by way of the cast) that the object referenced by the foo variable actually is a Bar object.

On line 17, you give the compiler the same kind of guarantee, giving it a (false) assurance that the object is a Bar object. The compiler is pretty trusting so it accepts that assurance you give in the code.  However, the runtime system is not as trusting. It double checks the type at runtime and discovers the lie and promptly issues a ClassCastException.

Line 13 is illegal because even though the underlying object is actually a Bar object, the reference foo is of type Foo, so using the lens filter analogy, your view of that object is limited to what a Foo object can do, essentially hiding whatever characteristics it has that are specific to a Bar object.
 
Cooper Gates
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Foo foo = new Bar();
// Could that be useful, or just inefficient,
// to only use the properties that the superclass has?
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Polymorphism is generally useful when used properly. There is no inefficiency in terms of performance. It costs nothing other than possibly limiting the things you can do with the object via that reference.

It's actually a common and useful construct to declare a super type while assigning instances of subtypes to it. The practice is foundational to the Liskov Substitution Principle
 
Junilu Lacar
Sheriff
Posts: 11476
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cooper, we've digressed from the OPs primary line of questioning. Let's bring it back to OP's problem. If you have any questions that you'd like answered, please start a different topic. Thanks.
 
Cooper Gates
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Junilu,

I'm waiting for Ben's answer for what he wants out of that Car class. I guess he could give it a start.

 
Campbell Ritchie
Marshal
Posts: 56520
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I would find all sorts of things to improve in that code.
  • Your indentation is inconsistent. Sometimes two spaces, sometimes none. Use 3 or 4 spaces to be visible on this website.
  • Incorrect format for setXXX and getXXX methods. They shoul‍d read setName and getName.
  • Field names starting with CapitalLetters. It should read theCars not TheCars
  • Use the following format for a constructor/setXXX method because it exposes a better identifier to the outside world:-
  • Don't try to correct indices in the array. If a wrong index is passed, throw an Exception. If you don't yet know how to throw your own Exceptions, let it throw the out of bounds exception.
  •  
    Cooper Gates
    Greenhorn
    Posts: 6
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Campbell,

    If you focus on user-friendly writing, then sure, code accordingly.
    My top priorities are what the compiler cares about and runtime performance.
    The code I posted was an example, I'm not expecting Benjamin to use it character
    for character (though he could). I just typed it on the fly (and not in my Netbeans editor).

    About getters – I often notice myself attempting to access a variable or method directly,
    such as XXX, and then realizing it's private. I prefer to simply add parentheses to use
    XXX() instead of getXXX(). I haven't used the feature of Netbeans
    “Create getters and setters” to put those in a class for me.

    Array indices – I find it very easy for someone to pass a negative number or too large
    of a positive into such a function; I could use a try catch, but I don't want it to do nothing
    with an invalid index. Just my opinions. Same goes for division by zero, especially if
    the division method needs to return a double. Throw an exception, sure, but what number
    do you return for 1.0 / 0.0, -3.0 / 0.0, 0.0 / 0.0, etc. etc.? Something needs to be picked.

    Thanks.
     
    Campbell Ritchie
    Marshal
    Posts: 56520
    172
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Cooper Gates wrote:. . . My top priorities are what the compiler cares about and runtime performance. . . .
    That will lose you jobs if you try it elsewhere. It is potentially dangerous to code for performance alone; you need to give correctness of the code first priority. Legibility of code is important if you are going to work with somebody else.
    About getters – I often notice myself attempting to access a variable or method directly, such as XXX, and then realizing it's private.
    You shou‍ld take it for granted that all variables have private access and write get method and set methods as appropriate.
    I prefer to simply add parentheses to use XXX() instead of getXXX(). I haven't used the feature of Netbeans “Create getters and setters” to put those in a class for me.
    There are standard formats and many tools require those formats for getXXX and setXXX methods to work. By getting into bad habits, you are storing up difficulties for yourself in the future. Also remember that you are talking to beginners here, who don't have the experience to assess advice given. We who are more experienced need to screen the advice given.
    Array indices – I find it very easy for someone to pass a negative number or too large of a positive into such a function; I could use a try catch, but I don't want it to do nothing with an invalid index. Just my opinions.
    I think there are three realistic options for an incorrect array index:-
  • Throw an illegal argument exception.
  • Throw an index out of bounds exception.
  • Wait for the runtime to throw the same index out of bounds exception.
  • Don't attempt to catch an exception in the same method that it was thrown in. Leave that to the calling method. If it cannot handle the exception, it will be necessary to alter the code to ensure the correct index.
    Same goes for division by zero, especially if the division method needs to return a double. Throw an exception, sure, but what number do you return for 1.0 / 0.0, -3.0 / 0.0, 0.0 / 0.0, etc. etc.? Something needs to be picked.

    Thanks.
    Do you know the different behaviour of integer arithmetic and floating‑point arithmetic with respect to division by zero? It is all in the Java® Language Specification, but that can be difficult to read. When you know that, you will be able to decide when to throw exceptions about division by zero.

    Don't use the enter key in the middle of a paragraph, please. Let the reader's browser do the line wrapping.
     
    Junilu Lacar
    Sheriff
    Posts: 11476
    180
    Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Not to pile on but I'm with Campbell:

    1. Readability, organization, correctness, simplicity take precedence over performance when you're writing code. Performance improvements need to be justified by hard data obtained through benchmarks and proper analysis, not just gut feel and intuition. Also, it's easier to make clean, well-organized code performant than when it's not clean and well-organized. Code is read more often than it is written. If people reading your code can't understand it immediately, then you are wasting their time. More often than not, maintenance costs are where you can really save a lot of money. Lastly, Donald Knuth famously said, "Premature optimization is the root of all evil."  Don't be evil; your primary focus as a programmer should be to write clean, clear code.

    2. getXXX() and setXXX() is a widely accepted and used convention in Java programs. Flouting this convention will just create problems for you and others, especially if you use frameworks that assume code follows the convention. Spring, JSPs, EL, XML and JSON marshalling/unmarshalling frameworks, etc. all assumes code follows the JavaBean convention for naming getters and setters.
     
    Henry Wong
    author
    Sheriff
    Posts: 23295
    125
    C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Cooper Gates wrote:
    Same goes for division by zero, especially if the division method needs to return a double. Throw an exception, sure, but what number do you return for 1.0 / 0.0, -3.0 / 0.0, 0.0 / 0.0, etc. etc.? Something needs to be picked.


    Besides what Campbell mentioned, why do we even need to pick a result? The floating point standard that Java uses already define results for the three cases mentioned. Why do we need to reinvent the wheel?

    And BTW, the results for the three cases are "infinity", "-infinity" (negative infinity), and "NaN" (not a number). These are valid floating point numbers, that can be compared against, used in further arithmetic, and even printed.

    Henry
     
    Campbell Ritchie
    Marshal
    Posts: 56520
    172
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Henry Wong wrote:. . . . These are valid floating point numbers, that can be compared against, used in further arithmetic, and even printed.

    Henry
    Compared? Well sort of. One of those three has some unexpected behaviour if you try comparing it.
     
    Benjamin Rollins
    Greenhorn
    Posts: 22
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for all the help and the useful information.
    I found out the problem was the compiler couldn't  find a definition for my Car class .

    I came out with this:

     
    Junilu Lacar
    Sheriff
    Posts: 11476
    180
    Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations on getting your code to work!

    Here are a few things you should clean up:

    1. Indentation. Your code indentation is atrocious. There seems to be no rhyme or reason to the indentation as you have posted it. If you're using an IDE like Eclipse, you can easily fix the indentation by pressing Ctrl+Shift+F.  You can also try to find an Online Java Formatter and use that.

    Here's what one of those did to pretty up your indentation:

    That's a little better. You can actually clearly see where your different program elements start and end.
     
    Junilu Lacar
    Sheriff
    Posts: 11476
    180
    Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Improvement #2:

    That can actually be shorted to one line of code:

     
    Benjamin Rollins
    Greenhorn
    Posts: 22
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks a lot for your help Junilu.

     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!