Nov 8, 2009

Need Help: Find Lowest Character Using Java

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Programming General > Java

Need Help: Find Lowest Character Using Java

cyph3r
Heya guys,

Been a looooong time eh, yeah well i was kinda buzy with college stuff and all those assignments just keep pouring in. I have java this semester and i have "NO" idea how to go abt it, 1 reason being that my proff. is going real fast in the explaination part and i doubt she knows anything in java blink.gif

Newayz , i was asked to do a small program in java , heres how it goes :

I need to enter a word prefixed by the number of letters in it, and the output should show me the smallest character in that word.
eg: 5Hello .... Smallest character is : e

We were started off in studio .net and i have again no idea of how that works .. but playing around a bit made me get used to a few controls. This is how i started off , but i duno how to continue , could someone please point out any mistake and give me any ideas or better off , just give me ideas and not the whole program so i would try it myself , i am really bad at logic sad.gif i know that suc*s .. but err .. i need to pass out oof this subject and get rid of this annoying proff. i have ...

CODE
package smallchar;
import java.io.*;
import java.awt.*;
/**
* Summary description for Class1.
*/
public class Class1
{
public Class1()
{
 //
 // TODO: Add Constructor Logic here
 //
}

/** @attribute System.STAThread() */
public static void main(String[] args) throws IOException
{
 DataInputStream n=new DataInputStream(System.in);
 String ch;
 String a;
 char small;
 int p;
 System.out.println("Enter The String After Entering The Number Of Characters");
 ch=n.readLine();
 int i;
 a=ch.substring(0,1);
 p=Integer.parseInt(a);
 small=ch.charAt(1);
 for (i=2;i<p;i++)


...... How do i proceed with the for loop ? i really have no idea ..

Thankx in advance
Dhanesh

 

 

 


Comment/Reply (w/o sign-up)

miCRoSCoPiC^eaRthLinG
You were on the right track but not quite.

First of all you really don't need the package statement, unless you want to classify your code in a separate namespace. But anyway, no harm with that. Besides if you're using Visual Studio.NET, this will be added automatically. Also you don't need to import java.awt - that's the Abstract Windowing Toolkit - which you need only when you are designing Windows based Appz with a GUI.

CODE
package smallchar;
import java.io.*;
import java.awt.*;


This part is fine... although you might consider naming your class something meaningful, instead of simply Class1
CODE

/**
* Summary description for Class1.
*/
public class Class1
{
public Class1()
{
 //
 // TODO: Add Constructor Logic here
 //
}


You don't really need to add that throws IOException to your main - it will do so in any case.

CODE

/** @attribute System.STAThread() */
public static void main(String[] args) throws IOException
{


The part below this is really messed up. You can use DataInputStream to read in your line, but I'd advise you to use a subroutine that I use to fetch lines for me.. works like a charm.
Here it goes:
CODE

   public String readLine( )
   {
       char nextChar;
       String result = "";
       boolean done = false;

       while (!done)
       {
           nextChar = readChar( );
           if (nextChar == '\n')
              done = true;
           else if (nextChar == '\r')
           {
               //Do nothing.
               //Next loop iteration will detect '\n'.
           }
           else
              result = result + nextChar;
       }

       return result;
   }


=============================================
String ch;
String a;
char small;
int p;
System.out.println("Enter The String After Entering The Number Of Characters");
ch=n.readLine();
int i;
a=ch.substring(0,1);
p=Integer.parseInt(a);
small=ch.charAt(1);
for (i=2;i<p;i++)[/code]
=============================================
As for this messed up part... I wouldn't go into rectifying it - but rather am providing you with a full sample program that would do what you're trying to do.

Full Sample
CODE

package LowestChar;
import java.io.*;
import java.util.*;

/**
* Summary description for Class1.
*/
public class LowestChar
{
public LowestChar()
{
 //
 // TODO: Add Constructor Logic here
 //
}

/** @attribute System.STAThread() */
public static void main(String[] args)
{

 // Variables
 String line;
 int Lowest = 128, Ascii = -1;  // To keep the compiler happy

 // Prompt
 System.out.println ("Enter a line of text: ");

 // Read Line
 line = readLine ();
         
 // Loop through each character of the string and find which is the lowest
 for ( int Count = 0; Count < line.length(); Count ++ )
 {
  // This is the step that gets you the lowest value
  // Every time Count increment, a new character is taken into consideration
  // String.charAt (Position) gives you the particular character at that position of the string
  // Type casting it to 'int', by: (int) character - gives you the Ascii value of that character
  // You store that in Ascii and compare to lowest. If it is lower than the lowest value, make Lowest
  // equal to that character and loop again.
  Ascii = (int) line.charAt(Count);

  if ( Ascii < Lowest )
   Lowest = Ascii;

 }

 // Print out the lowest char by type casting the integer value back to char
 System.out.println ( "Lowest Character: " + (char) Lowest );

}


// Method to read in a line of text
public static String readLine( )
{
 char nextChar;
 String result = "";
 boolean done = false;

 // Loop till enter/newline character is met
 while (!done)
 {
  nextChar = readChar( );
  if (nextChar == '\n')
   done = true;
  else if (nextChar == '\r')
  {
   //Do nothing.
   //Next loop iteration will detect '\n'.
  }
  else
   result = result + nextChar;
 }

 // Return the string
 return result;

} // end readLine

// Method to read a Character
public static char readChar( )
{

 int charAsInt = -1;   // Keep the compiler happy
 
 try
 {
  // Read the character as integer
  charAsInt = System.in.read( );
 }
 catch(IOException e)
 {
  System.out.println(e.getMessage( ));
  System.out.println("Fatal error. Ending program.");
  System.exit(0);
 }

 // Return the character
 return (char)charAsInt;

} // end readChar

} // end class



NOTE: Keep in mind that this wouldn't return the lowest char as you've shown. The lowest char is actually the character with the lowest ASCII value. The lowest values will be that of Numbers followed by CAPITAL Alphabet and then small Alphabet. This should help you out in what you are trying to achieve. Feel free to modify the code to suit your needs.

 

 

 


Comment/Reply (w/o sign-up)

cyph3r
First off ... Welcome Back ! smile.gif Had a nice vacation i see .. hehe

Do u NOT know anything ? Jeez I least expected you to reply , and wow what a timing. Thankx a bunch for the quick reply.

About the code, well i gave ur code a nice look and tried doing the thing on my own, well it took some time to get it right, but finally came up with the solution, i checked up with my proff at college ( belive me i hate that woman to the core ) , she had like a million problems with it, its like " I dont want u to do it the easy way and use pre frunctions .. write your own and do it " HELL !

Newayz , this was the final outcome

/** @attribute System.STAThread() */
public static void main(String[] args)throws IOException
{
DataInputStream n=new DataInputStream(System.in);
String ch;
String l;
String a;
char small;
int p;
System.out.println("Enter The String After Entering The Number Of Characters");
ch=n.readLine();
int i;
a=ch.substring(0,1);
p=Integer.parseInt(a);
small=ch.charAt(1);
for (i=2;i<p;i++)
{
if(small>ch.charAt(i))
small=ch.charAt(i);
}

System.out.println("\n Smallest Character");
System.out.println(small);

l=n.readLine();
}
}

I got an idea from ur code and used it in the one i did, hope that isnt a problem. The only thing bothering me is that .. what is "throws IOException" i know its one of the components of import java.io, but in this case as u said it will do it any ways .. How does that happen ? I mean dont we have to define every bit of code supporter while programming ?

Please pardon me for being so pestering , but i really duno this subject that well , i mean javascript was fine , it was fun and cool , but this is just crazy, either i need a good teacher or i need a good book. I rather consider myself to be a Hardware Freek than a software one.

Thankx for the Reply and i guess m done with this bit of program smile.gif just working on the palindrome program now .. blink.gif ughh

Regards
Dhanesh

Comment/Reply (w/o sign-up)

evought
QUOTE(cyph3r @ Oct 23 2005, 03:07 PM)
<snip...>

I got an idea from ur code and used it in the one i did, hope that isnt a problem. The only thing bothering me is that .. what is "throws IOException" i know its one of the components of import java.io, but in this case as u said it will do it any ways .. How does that happen ? I mean dont we have to define every bit of code supporter while programming ?

Please pardon me for being so pestering , but i really duno this subject that well , i mean javascript was fine , it was fun and cool , but this is just crazy, either i need a good teacher or i need a good book. I rather consider myself to be a Hardware Freek than a software one.

Thankx for the Reply and i guess m done with this bit of program smile.gif just working on the palindrome program now ..  blink.gif ughh

Regards
Dhanesh
*



"throws IOException" tells the compiler that the method is allowed to throw an Exception derived from IOException to indicate a problem. When an exception is thrown, it travels up the stack, back through all the methods that have been called until it reaches a "catch" statement which handles it. If there is no 'catch', the exception goes all the way up to main and exits the program.

The reason you do not need it in your case is that the method you were adding it to *was* main. There is no where else for the exception to go, so do not bother declaring it. If an exception is thrown in main, it will jsut exit the program anyway.

If you wanted to handle the error in some way, like printing put a message or giving the user another chance, you would put the read calls inside a try...catch block.

Comment/Reply (w/o sign-up)

cyph3r
QUOTE(evought @ Oct 24 2005, 04:55 AM)
"throws IOException" tells the compiler that the method is allowed to throw an Exception derived from IOException to indicate a problem. When an exception is thrown, it travels up the stack, back through all the methods that have been called until it reaches a "catch" statement which handles it. If there is no 'catch', the exception goes all the way up to main and exits the program.

The reason you do not need it in your case is that the method you were adding it to *was* main. There is no where else for the exception to go, so do not bother declaring it. If an exception is thrown in main, it will jsut exit the program anyway.

If you wanted to handle the error in some way, like printing put a message or giving the user another chance, you would put the read calls inside a try...catch block.
*



Hey evought .. thankx for the explaination smile.gif , kinda understood what it really does , wished i had a better proffessor to teach sad.gif .. newayz have to live with it tho .. I need to pass out of this semester ! Sheesh .. i sound desperate ! rolleyes.gif

Comment/Reply (w/o sign-up)

miCRoSCoPiC^eaRthLinG
No problem at all - that's why I told you, that I'll give you a basic working code - just modify it to suit your needs. Also good explanation of the IOException, evought. Couldn't have done it better myself.

Dhanesh - it's like speaking in english terms, Exceptions are thrown, when something exceptional occurs - i.e. something out of the ordinary, an event that isn't supposed to happen during the normal flow of your code. To handle such scenarios we use the exception catchers in the form of a try..catch.. block. Exception itself is a base class, sort of a mother of all exception classes, which is thrown when some error occurs. When you write code to deal with a particular type of exception, you usually inherit the exception class and modify it to suit your needs.

When it comes to your void main() - it is already pre-taught to throw the IOException. That is why, it is not really necessary to add the code to it - although it doesn't do any harm. If it was for some other sub-routine, then yeah, of course, you'd have to add it, to inform the subroutine that it is to throw a particular type of exception when a problem occurs.

If you face any more tough java nuts to crack, post 'em all here. Haven't touched Java in a long while - would be fun again brushing up my skills smile.gif

Regards,
m^e

Comment/Reply (w/o sign-up)

BitShift
My computer teacher told me that although "throwing" and exception is handy, its a bad idea.

He said always use the try..catch block


try
{
//code here
}
catch(Exception exc){}

Comment/Reply (w/o sign-up)

iGuest-kuljeet
character
Need Help: Find Lowest Character Using Java

Do you NOT know anything ? Jeez I least expected you to reply , and wow what a timing. Thankx a bunch for the quick reply.

About the code, well I gave your code a nice look and tried doing the thing on my own, well it took some time to get it right, but finally came up with the solution, I checked up with my proff at college ( belive me I hate that woman to the core ) , she had like a million problems with it, its like " I don't want you to do it the easy way and use pre frunctions .. Write your own and do it " HELL !

Newayz , this was the final outcome

/** @attribute System.STAThread() */
Public static void main(String[] args)throws IOException
{
DataInputStream and=new DataInputStream(System.In);
String ch;
String l;
String a;
Char small;
Int p;
System.Out.Println("Enter The String After Entering The Number Of Characters");
Ch=and.ReadLine();
Int I;
A=ch.Substring(0,1);
P=Integer.ParseInt(a);
Small=ch.CharAt(1);
For (I=2;I<p;I++)
{
If(small>ch.CharAt(I))
Small=ch.CharAt(I);
}

System.Out.Println("\and Smallest Character");
System.Out.Println(small);

L=and.ReadLine();
}
}

I got an idea from your code and used it in the one I did, hope that isnt a problem. The only thing bothering me is that .. What is "throws IOException" I know its one of the components of import java.Io, but in this case as you said it will do it any ways .. How does that happen ? I mean don't we have to define every bit of code supporter while programming ?

Please pardon me for being so pestering , but I really duno this subject that well , I mean javascript was fine , it was fun and cool , but this is just crazy, either I need a good teacher or I need a good book. I rather consider myself to be a Hardware Freek than a software one.

Thankx for the Reply and I guess m done with this bit of program just working on the palindrome program now .. Ughh

Regards
Kuljeet

-reply by kuljeet

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : lowest, character, java

  1. Java Mouse Movement.
    (2)
  2. Java Memory Leak?
    (2)
     I have been using the picking tool with setShapeCylinderSegment (this returns infinit results but
    is capped). It works just fine for me (in terms of what it does) and it wasn't until just
    recently I noticed that it has been causing my program to spike the memory. I have looked through
    Google to see the problem and apparently it is caused a memory leak. I have tried to solve it by
    simply setting all the variables to null after they are used but this doesn't help. Is there
    something I can do to or a free software I can use to find the exact variable that is causin....
  3. Java And Sql: Data Mismatch
    (6)
    Alright, I'm having some really funky issue with this. I know it's a mismatch (obviously)
    and I want to know if the Astahost community members can help me solve this issue. It's been
    annoying me a lot of late. CODE try{         libSQL myAddNewData = new libSQL();         String
    strRownum =(String.valueOf(jComboBoxLName.getSelectedItem()));         if (intChoice == 1){
                myAddNewData.AddNewData("INSERT INTO CUSDATA (FIRSTNAME, LASTNAME, PHONE, SIN) VALUES
    ('"+ strUserData +"','" + strUserData + "','"  + strUserData + "&....
  4. Simple Java Question
    One Variable; Multiple Classes (5)
    I’m probably the only person that is able to do so much with Java3D and yet still can't
    even get some of the Java basics down. Anyway is it (and if so how is it) possible to make a
    variable editable and readable in multiple class files? It seems like this should be an easy
    question to answer, but here is a little code to help you understand what I am talking about. CODE
    public class test extends Applet{  public int Col = 0;      if(Col==1){     } } class
    TestB extends Behavior {    if(collision == true){   Col = 0;  }else{   Col = 1;  } } Tha....
  5. Java Java.security.accesscontrolexception
    (6)
     I have looked all over the web for a solution and none of them seem to work. Anyway, I am trying to
    load a 3d object onto a scene with a java applet and I get the following error. CODE
    java.security.AccessControlException: access denied (java.io.FilePermission object.obj read) I
    think that it has to do with my java.policy permissions, but I cant find anything that will fix it.
    Has anyone ever seen this error and/or know a solution to it? I am looking for a solution that will
    work on other people's computers without them downloading anything extra (other then ....
  6. Setting Up Java Correctly
    (11)
    First thing, I know the pictures say update 3, I'll update them to 4 soon... Since there's
    been alot of people saying this bot doesn't work!1!1!!elevenone1!11exclamination! I'll tell
    you how to set up your Java, correctly Before I say anything, if you get this problem Exception in
    thread "main" java.lang.NoClassDefFoundError: mudclient press any key to continue. . . This means
    you have set up your Java incorrectly, follow the tutorial properly Also if you are not an
    Administrator on your computer you can't change the Enviromental Variables. If yo....
  7. Loading 3d Models In Java?
    (2)
    I am currently using a 3D cad software to make models. I want to know if it and how it is possible
    to load 3D models using Java. I would like to make a game in java (I know I should be using OpenGL
    for this, but Java seems more secure). Now I have been looking all over the web (And Amazon books)
    for how to load 3D objects. I think java has loaders that convert objects into java objects but I
    can't figure how to use them. I have tried using Java 3D and a bit of JOGL but I have very
    little knowledge about them other then making basic things like cubes (not models). Is ....
  8. Java Db Help Pls
    (2)
    Now I am a compleate newbie to java. Now just from saying that I will get posts that say "read the
    basics first" ect. I know the basics but the way I learn isn't just by going over basics. What I
    want to do/know is if it is possible to connect to a MySQL Database using java. Is it possible and
    if so how? Tutorials and links to tutorials are welcome along with maby a list of required packages
    and an example code of connecting/selecting data. This is for MySQL not SQL (I don't know if
    there is a major difference in java or not). I am currently using SDK1.4.2_16. I ....
  9. Graphcal User Interfaces In Java
    How do you make them? (4)
    Ok, right now I am currently using eclipse, however I can change to whatever if there is something
    else that would be better for this. But I have made a number of java applications, but they all
    simply use the command line for doing their user input and output. However, I have been interested
    in learning how to program graphical user interfaces in java, and was wondering if somebody could
    point me in the right direction, with some easy to understand and follow tutorials. Also, once I
    have done that, what about making a java program that can be easily executed? (I know t....
  10. Java Sdk Vs. Java Jdk?
    What is the difference? (2)
    Ok, so previously I had installed the java SKD on my computer (the one that comes with netbeans), as
    of right now it is version 1.4.2_13 and I really didn't pay much attention to the version.
    Everything seemed to work ok for what I was doing, although I wasn't using netbeans, instead I
    have been using eclipse. (Since I am doing this for a class at school and that is their IDE of
    choice) Anyway my programs have to compile at the command line (not just work in eclipse). I have
    been able to get them to work in eclipse fine, but I am having trouble when I go to the ....
  11. Bluetooth And Java
    (5)
    Hey all Java programmers on Astahost, I'm wondering is it possible for Java to communicate to
    another computer through a Bluetooth device? The reason I ask this is because I want to create an
    instant messenger that would be using the Bluetooth "network" so that people can use their computers
    to communicate from one to another without the use of the Internet. This is very useful in
    situations where you want to talk to a friend nearby but does not have access to the Internet and
    cannot talk to them in person. Thanks, xboxrulz....
  12. Need To Modify Xml Attribute Using Java
    (7)
    hi, Im new to xml parsing and dont know much about. I need to modify the attribute val of a tag in
    a complex xml file im using xpath query to retrieve the node but xpath is read only and cannot
    modify. Im not able to use DOM as the xml is very complex and im not able to go to the exact node....
  13. Mozilla And Java!
    Step by step help needed from seniors in programming for developing a (2)
    Dear senior Members, I am a 18 year old boy. Just some months ago...I thought of an idea of
    developing an extension for mozilla firefox...one of the most popular web browsers out in the world.
    I wont disclose the complete Idea right here but the useful ness of the idea: The extensionm I
    thought about can be used to significantly reduce the bandwith for high speed connections and time
    for the slow connections given that the target person does use thw web for visiting mostly news
    sites, forums and check mails...so all in al a busy person sittin gon a slower connection o....
  14. How Do I Test A Java Aplication
    (11)
    Well..can someone introduce me?(picture introduce is well)....
  15. How To Create Exe File In Java?
    (17)
    Dear friends I came to know that one can build exe files from java application. How this is
    possible? According to me there is no such method in java to cerate exe files. However Microsoft
    used to provide a free system development kit (SDK), for Java, which includes the jexegen tool. But
    one need install Microsoft Java Virtual Machine to run such application. Some people suggest
    InstallAnyWhere.....
  16. Java Phone Book
    A console base java phone book program (5)
    Hello everybody I wrote this program a few months back when I wan learning JAVA.I haven't
    learned java yet though because its to vast. The program is console based. It uses the util package
    of java in a great way. It keeps record in a flat file. You should create a Data file called
    phone.dat in same folder where phone.java is kept. So here is the code:-(phone.java) CODE
    import java .io .*; import java .util .*; import java.awt.event.*; public class phone {
        public void new_record()     {        String id,name,city,add,number,total,list;         
    boolean b....
  17. Other Sound Format Support
    Sound in Java (3)
    I know how to play a sound file in an applet and an application. I was wondering though if anyone
    knows how to make Java play other sound formats such as mp3, wma, etc.. Well especially an mp3. I
    know Java already supports wav, au, and aif How do you play mp3's?....
  18. Snake In Java
    A game i programmed with a friend (2)
    My friend and I have been working on a project. It is called Snake, and its the old fashion snake
    game that used to be on the first cell phones with games. Of course this 1 has a few more features
    but we wanted to keep it simple. It was 100% programmed in Java, no support from other languages.
    I am in Computer Science 2 AP at my high school, so its only my second year with Java, and its my
    first programming language. I've found it extremely easy to learn. Once you understand how to
    use the libraries, and read the JavaDocs then you can do almost anything without ....
  19. How To Configure/intergrate Jboss 4 With Java?
    (1)
    Can someone help me?....
  20. On Why Java Is 'c'ooler!
    additions / criticisms invited (10)
    im basically a C++ programmer and into Java only now..and i seem to falling in love with it. here
    are my thoughts on why i think Java seems cooler /wink.gif" style="vertical-align:middle"
    emoid=";)" border="0" alt="wink.gif" /> i invite people to add on to the list, im sure there are
    great many things i have missed out..things im yet to be enlightened in Java! 1. no more of those
    wierd pointers! this pointer thing always seemed to me something gone all wrong..something that
    lacked better conception. thank god i dont have to use * and & alternatively to deal with on....
  21. Java App To Web App
    (12)
    I have this Java Application that is already coded which interacts with a database. Is there any
    way that would be easy enough to launch this application via a local intranet? It is not in any
    Applet package, but I do have the JARs. Can this be done without too much effort?....
  22. Looking For A Java IDE
    (26)
    Hello Java people! I'm starting to work more on java this spring (university stuff) and I think
    I need a proper IDE. So far my java programming has been in little scale so editor and command line
    compiling has worked just fine. So I'm looking for a good, free IDE. It does not need to have
    fancy features, just what you'd expect from an IDE. My previous experience on IDEs limits
    pretty much to MS Visual Studio. I've also tried out Borland's builders but I've hated
    them, granted they all were quite old versions. So what IDEs you use and what y....
  23. Video Streaming In Web Browser Through Java Or Jsp
    video streaming in web browser (2)
    Can anyone give idea about video streaming in web browser through java or jsp I need to play video
    presentation in my web browser to show all members of the company.For I want to put my video file in
    web server and anyone can access that video just playing on their browser our web browser is
    firefox. We don’t want to use any active X properties or any default media player in web browser
    . Our Platform is linux fedora core4, web server is tomcat 5 . We read the JMF java media Framework
    API, but I couldn’t understand how to use this in our server for linux. There is ....
  24. Java By Example
    (8)
    Java was the first programming language that I learned on my own...no teachers, no friends, just me
    and the internet. One of the best aspects of Java is the heavy documentation provided by Sun and
    every other Java developer out there. Here is a link to a site that lists loads of examples of Java
    code. http://javaalmanac.com/egs/ ? They have examples of setting up a JDBC/ODBC connection for
    database use, creating ZIP files for archival purposes, and simply showing you how to use vectors.
    This site is great for learning the basics and building applications on top of i....
  25. Download Java Ebooks
    Java Books (17)
    Download java books from below sites http://www.gayanb.com/ The eBook links you've posted
    contain a bunch of illegal eBooks. Be aware that this is in direct violation of our TOS . Links
    removed. ....
  26. What Are The Advantages Of Java Vs C++?
    (15)
    what are the advantages of c++ and what are the advantages of java? what one is more userfriendly,
    and what one has more capabilities?....
  27. Array Sorting
    Does anyone hava a decent JAVA method (21)
    does anyone have a decent JAVA method that will sort an array from smallest-to highest?
    /mellow.gif" style="vertical-align:middle" emoid=":mellow:" border="0" alt="mellow.gif" /> The one
    i'm trying to write doesn't seem to work... or if you could look at mine below, and tell me
    what i did wrong, that'd be nice to.(if it reallllyyyyyyyyy sucks, please dont laugh to loud
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> ) This should
    take an array and then calculate how many of a number is in it, add it to the first slots....
  28. Java Unlimited
    Java,jsp,servlet,Swing,GUI Designing (14)
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Common guys
    and let have a chat over robust java! Cheers Arunkumar.H.G....
  29. Using system date in java... How?
    (7)
    How do u use system date in java? I only know how in jsp. In jsp, u need to do the code below to get
    the sysdate String date = DateFormat.getInstance().format(new Date()); and you will be able to
    get the system date which has the format 6/6/04 7:19 AM ______________________ iv tried to do this
    in java import java.util.Date;public String getSysDate() { String date = "";
    String date = DateFormat.getInstance().format(new Date()); return date; }
    there's an error on the variable DateFormat., it cannot resolve symbol. does ....
  30. java.lang.NullPointException
    (4)
    hi, all, I have a question, can anybody give an answer? Thanks in advance. Why the following code
    throws NullPointerException? String v =null;
    System.out.println("aaaaa"+v==null?"":Integer.toString(v.length())); while the following code not?
    String v =null; System.out.println("aaaaa"+(v==null?"":Integer.toString(v.length())));....

    1. Looking for lowest, character, java

See Also,

*SIMILAR VIDEOS*
Searching Video's for lowest, character, java
advertisement



Need Help: Find Lowest Character Using Java

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com