Displaying characters entered

hi all
iam very new to java
u might find this question very silly
i have written a program for displaying the contents which i am typing in the keyboard
iam able to get the output for any characters entered from the keyboard but if i include || it displays all the characters entered until the character ||
i dont know what is the problem
some one please help me regarding this
This is my code
import java.io.*;
class strcomp
public static void main(String args[])
String str;
int count=0;
count=args.length;
System.out.println(count);
for(int i=0;i<count;i++)
str=args;
System.out.print(str);

Pass it with ""
try this
java strcomp *

Similar Messages

  • I used to update my iPhone 4S applications whenever a new update is available, but at this time, "unknown error" displays after entering my apple id password. Anyone who could help, whom they might have experienced? Thanks

    I used to update my iPhone 4S applications whenever a new update is available, but at this time, "unknown error" displays after entering my apple id password. Anyone who could help, whom they might have experienced? Thanks

    Hi Christianjr,
    When you say you reset your network settings, what do you mean, exactly?
    I saw another post on this issue, and the poster indicated that they resolved the problem by turning off their cellular date option and wifi options in Settings, and then turned them back on.
    Also, resetting your phone may help - press the Home and Power buttons at the same time and continue to hold both down until the Silver Apple appears. Once it is back up, click on the update option and see if it fixes the problem.
    If none of those things work, then need to have details on what you did to reset your network settings....
    Cheers,
    GB

  • IPad will open but not display information entered on a form sent as a PDF.

    iPad will open but not display information entered on a PDF file. Same file will open and display all information on my iMac. Anyone had this problem?

    I think that you are trying to view a form fields PDF file and you cannot see the content that was filled in on those fields. Form fields will not show in the mail app or in iBooks. Download Adobe Reader for the iPad. It is free and it offers a lot of features for a free app. Save that PDF to Adobe Reader and see if the text in the fields appear.

  • How to display previously entered data in TableModel

    This post is continued from the last one. I was having problem displaying previously entered data into TableModel. someone suggested whether my TableModel is persistent.
    I am sorry to say I am not sure how to make TableModel persistent. Can someone tell me what to do.
    Following is my implementation of TableModel:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    import java.io.*;
    public class UsersModel implements TableModel {
    public static final String[] colNames ={
    "Usernmae",
    "Location"
    public static final Class[] colClasses ={
    String.class,
    String.class,
    public static final int
    USERNAME_COL = 0,
    LOCATION_COL = 1;
    //used to hold a list of TableModelListeners
    protected java.util.List tableModelListeners = new ArrayList();
    protected java.util.List data = new ArrayList();
    public static void main(String []args){
    new UsersModel();
    }//end main
    public UsersModel(){
    public void add(Users u){
    data.add(u);
    and when I need to add new users, I do it in the following way:
    Users u= new Users(n,l);
                        model.add(u);
                                  table.setModel(model);
    I hope someone can help

    Please post the entire class, this certainly won't compile because it does not implement all the TableModel methods. Also, why not base it off of AbstractTableModel?

  • How to limit the number of characters entered in a JTextfield???

    Hello there,
    I have created a Text box using swing component JTextField and I want to limit the number of characters entered to 8 characters..how do i proceed with that?
    Thanks in advance!
    Joe

    Ty out this
    import com.sun.java.swing.text.*;
    //import javax.swing.text.*;
    public class JTextFieldLimit extends PlainDocument {
    private int limit;
    // optional uppercase conversion
    private boolean toUppercase = false;
    JTextFieldLimit(int limit) {
    super();
    this.limit = limit;
    JTextFieldLimit(int limit, boolean upper) {
    super();
    this.limit = limit;
    toUppercase = upper;
    public void insertString
    (int offset, String str, AttributeSet attr)
    throws BadLocationException {
    if (str == null) return;
    if ((getLength() + str.length()) <= limit) {
    if (toUppercase) str = str.toUpperCase();
    super.insertString(offset, str, attr);
    import java.awt.*;
    import com.sun.java.swing.*;
    //import javax.swing.*;
    public class tswing extends JApplet{
    JTextField textfield1;
    JLabel label1;
    public void init() {
    getContentPane().setLayout(new FlowLayout());
    label1 = new JLabel("max 10 chars");
    textfield1 = new JTextField(15);
    getContentPane().add(label1);
    getContentPane().add(textfield1);
    textfield1.setDocument
    (new JTextFieldLimit(10));

  • Can we add display characters to Free characteristics

    hi Gurus,
    I have a some material display attribute in the report and customer wants to add these display characters to free characteristics so that he wants to drill down with other charcters like plant. Can we add directly in query defination or do we need to convert to navigational attribute and then add as a free characteristics.
    Regards,
    Preety

    Its not possible, even if you make navigational the parent char dta will only be coming.
    If you are sure that the other char data will have same value for those attr,then go ahead and create nav.
    If not you need to include those attr in the cube.
    Hope its clear
    Cheers,
    Shana
    Thanks = pts in SDN

  • Uprgrad to ios7 calender won't display text entered. the appointment entered is there becauwse it alerts me to appointments entered

    Calender won't display text entered for appointments.
    The appointments are there as the phone alerts me as requested. Also the appointments are synced with icloud and Outlook on my computer.
    Any appointments entered in computer do not show on phone but are there.

    I've managed to fix this!
    In case it's helpful to anyone encountering this problem, here's what I did.
    I went into the preferences (through the Calendar app, not the System Preferences - didn't want to remove the entire account info, in case I encountered problems getting my email to link again), clicked on the Account tab and removed the Exchange account (by clicking the "-" (minus) sign below the listing of accounts).  I then added an account (clicking the "+" sign) and re-entered the information.  When asked if I wanted to add these settings for Mail and Contacts, I unclicked those options (bc they're already installed and work fine).  Once I completed the information, I closed the settings window, and hit ⌘+R to refresh and all the Exchange appointments appeared.

  • E90 Web Browser displays characters incorrectly

    Hi there,
    I've recently bought a Nokia E90 and have found it pretty cool so far, except for one thing: the Web Browser is not displaying characters correctly. It shows almost all of them as empty rectangles, with just one or two exceptions.
    I've checked several web pages (including ones that I maintain and which, therefore, I /know/ send correct character encoding information), both online and local and it happens on all of them.
    I've tried changing the settings to "Automatic" character encoding and "UTF-8" and it doesn't make any difference (I haven't tried any of the others, though most of them are for non-Latin alphabets).
    The characters display correctly throughout the rest of the OS (notes, QuickOffice, Acrobat Reader, etc.) - its just the Web Browser which is effected.
    The only significant changes I've made from factory settings are installing three applications: Python, PuTTY and OggPlay. I removed OggPlay after I installed it because it didn't seem to work (in fact, it sort of "crashed" the phone - I had to remove the battery to get it to work again!).
    Does anyone have any ideas why the Web Browser is not displaying characters correctly? Any help would be very much appreciated (considering how expensive the phone is!)
    Thanks.

    Hi Guys,
    I have also encountered the same issue: Most Characters are not displaying properly on the E90 Web browser. I am currently using E90 which is (English/Arabic and French) enabled.
    I have checked the same websites with N95 and there not a single problem.
    I am quite disappointed with the E90 website browsing experience especially that I am running the latest FW (v210.34.75), so keep hoping that this gets fixed with the next FW version.

  • How to limit characters entered in JTextField

    Hi,
    How can we limit character entered in JTextField.
    1.) I know its posssible with JFormatedTextField...
    2.) I can do this by creating a child class of JTextField.....
    But there must be an easy way (sun guys would have included some methods to limit characters entered)
    Any one know any such methods...?
    Thank You
    Ashish P.J

    Read the API for JTextcomponent and follow the link to the tutorial where you'll find a working example of using a DocumentFilter to achieve this.
    db

  • Error message if invalid characters entered in PM order oper.short text fld

    Hi ALL,
    I need to display a error message, when user enters the invalid characters in work order operation short text field. The error message should be displayed during work order u201CSaveu201D (during creation and change mode).
    Kindly let me know is there is any user exit / BADI can be used for this.
    Note: I have checked some user exit, such as IWO10009 but I am not getting the value of Operation short text (AFVGD-LTXA1) to compare and throw the error message
    Regards
    Ramu

    hi
    the exit is correct but don't use structure field,
    follow this to get text
    get AUFPL(Routing number of operations in the order)from  CAUFV and paa it in AFVC -AUFPLyou get the short text
    it can be usefull
    -ashok

  • Update values in AlV grid display after entering value

    Hi,
         I have an issue in ALV grid display.
        Let me explain.
        i have 8 fields to display in which one is editiable.
       Fields are: date
                       material,
                       material Description,
                       Opening Stock,
                       Closing stock-  (  this field is editiable)
                       Closing stock,
                       Received Stock,
                       Actual production.
    Actual production = Closing stock + removal stock
                                 - receipt stock - opening stock.
    when i change the value of closing stock and press enter, actual production should get update, the new values should display.
    Thany you in advance.

    Hi,
    Please refer the code below:
    REPORT z_demo_alv_jg.*******************************************************************
    * TYPE-POOLS                                                      *
    TYPE-POOLS: slis. *******************************************************************
    * INTERNAL TABLES/WORK AREAS/VARIABLES     *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.*******************************************************************
    * FIELD-SYMBOLS                                                   *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.*******************************************************************
    * SELECTION SCREEN                                                *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.*******************************************************************
    * START-OF-SELECTION                                              *
    START-OF-SELECTION.* Storing table name
      p_table = tabname.* Create internal table dynamically with the stucture of table name
    * entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.    LEAVE TO LIST-PROCESSING.
      ENDIF.
    * Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.* Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.  SORT i_fieldcat BY col_pos.* Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.  REFRESH <dyn_tab_temp>.* Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.  IF sy-subrc <> 0.  ENDIF.*&-----------------------------------------------------------------*
    *&      Form  SET_PF_STATUS
    *       Setting custom PF-Status
    *      -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.  SET PF-STATUS 'Z_STANDARD'.ENDFORM.                    "SET_PF_STATUS*&----------------------------------------------------------------*
    *&      Form  user_command
    *       Handling custom function codes
    *      -->R_UCOMM      Function code value
    *      -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.* Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.* Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.* Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.* Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.*   When a record is selected
        WHEN '&IC1'.*     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.*       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.*       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.*         Make all the fields input enabled except key fields
              w_field-input = 'X'.          MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.        ENDIF.*       Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.        IF sy-subrc = 0.*         Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.*         If the record is changed then track its index no.
    *         and populate it in an internal table for future
    *         action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.      ENDIF.*   When save button is pressed
        WHEN 'SAVE'.*     Sort the index table
          SORT i_index.*     Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.      LOOP AT i_index.*       Find out the changes in the internal table
    *       and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.      ENDLOOP.*     Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.      IF sy-subrc = 0.*       Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.        REFRESH <dyn_tab_temp>.*       Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.      ENDIF.
      ENDCASE.  rs_selfield-refresh = 'X'.ENDFORM.                    "user_command
    Thanks,
    Sriram Ponna.

  • PDF displaying characters instead of text

    I have a user that is trying to view a PDF using Acrobat X and has random characters display instead of text.  Other users with Acrobat X are able to view the document fine as well as other users who have previous version of Reader.  I have tried running a repair on the installation as well as disabling protected mode at startup.  Any idead on what to do?  This is on the display for this user not printing.
    Thanks,
    Chris

    As Jogn said you would have to use the planning connection. The smart lists used in planning are not in Essbase. Essbase stores the smartlist ID number not the text value.

  • How to display and enter Chinese in the application?

    Hi,everyone,I encounter such the problem about characterset.When I run the application on the jdeveloper3.1,I can't enter or display chinese,but VisualAge3.0 can do it.I don't know how to solve it?
    Thanks in advance!

    There may be a simpler answer... but
    Generally speaking, the latest version of the JDK 1.3 does a much better job with internationalization / localization.
    As you know, you can switch JDK's that JDeveloper works with (documented in help)
    so that JDeveloper can work with JDK 1.3.
    I would suggest you use JDK 1.3 RC2 or higher and see if this solves your problem.
    One reason that Visual Age works is probably due to VA is using the IBM libraries which include additional enhancements.
    Other comments/suggestions welcome,
    -John
    null

  • Displaying characters.

    Hello.
    Well, i know how to compile unicode files (with japanese charcaters). But when the applet appears in the windows Explorer, there are only squares in place of the japanese characters.
    Can someone help me to solve this problem? My pc can displays Japanese characters of a HTML page, but not characters of my applets, so it's not a missing font problem, i think.
    Thank you by advance for your help!
    Ciao!

    The question is about applets, not about HTML. So the
    problem is not with encodings, but with fonts. You
    need a font that can render the Japanese characters
    correctly, and you need your components to use that
    font. That sounds easy -- use the setFont() method on
    every component or something like that -- but in
    practice it's difficult to know what fonts are
    available on the client system. I don't have any
    practical advice about how to deal with that problem.Well if it is a font problem (I wouldn't know about a problem like this, I'll take DrClap's word for it), you could package your program with a .ttf file or whatever it is and load it with an InputStream and use the Font.createFont() method.

  • Reading Unicode from textfile, displaying characters

    There is a textfile "readit.txt", which contains the following Unicodes:
    \u672c\u8a9e\u6587\u5b57\u5217I'm reading this file and try to display it, expecting to see some Chinese characters on my screen.
    try {
         fis = new FileInputStream(file);
         in = new InputStreamReader(fis);
         br = new BufferedReader(in);
         while((fileLine = br.readLine()) != null) {
              sb.append(fileLine + lineSep);
    } catch(FileNotFoundException e) {
         e.printStackTrace();
    } catch(IOException e) {
         e.printStackTrace();
    System.out.println(sb.toString());Above code doesn't work. It just displays exactly whats in the file.
    The weird thing is that it works well when doing this:
    System.out.println("\u672c\u8a9e\u6587\u5b57\u5217");It will then output 本語文字列

    836019 wrote:
    There is a textfile "readit.txt", which contains the following Unicodes:
    \u672c\u8a9e\u6587\u5b57\u5217I'm reading this file and try to display it, expecting to see some Chinese characters on my screen.
    try {
         fis = new FileInputStream(file);
         in = new InputStreamReader(fis);
         br = new BufferedReader(in);
         while((fileLine = br.readLine()) != null) {
              sb.append(fileLine + lineSep);
    } catch(FileNotFoundException e) {
         e.printStackTrace();
    } catch(IOException e) {
         e.printStackTrace();
    System.out.println(sb.toString());Above code doesn't work. It just displays exactly whats in the file.It works perfectly. The file has the character '\', then the character 'u', then the characters '6', '7', '2', 'c', etc. Those are just characters. BufferedReader has no way of knowing you want to interpret them as unicode escape sequences.
    I imagine there's a method somewhere in the core API that will convert those sequences to their corresponding characters.
    The weird thing is that it works well when doing this:
    System.out.println("\u672c\u8a9e\u6587\u5b57\u5217");It will then output 本語文字列That's because the Java compiler, unlike BufferedReader, does parse unicode escape sequences.

Maybe you are looking for

  • Display prefs showing extra display when none are connected

    I have a MacBook Pro and when I go to the display preferences it shows another display when no monitor is connected. I have searched the web extensively for a fix and haven't found anyone with the same problem. I'd prefer to just delete some obscure

  • Number of records in an LUW

    Hi, Im new to BI. How many records can be there in an LUW?

  • Updating a shared report?

    In Discoverer Desktop, is there a way for a user who is NOT the owner of a shared report to modify it and save the updated version over the original? I have a group of users who want to all be able to access and update a single report, but it's cumbe

  • Best settings to fix interlacing

    So now that I've been working in HD, my video looks fine as I edit, but once I export I get this really ugly interlacing going on. It looks awful when I play it on my computer, but if I put the video on a DVD it plays smoothly on Standard and HD TV's

  • After restart or power off and on. total recent apps and data(call,sms history) loosing.

    i am using BlackBerry Z10 with 10.3.1. OS. 2-3 times i was tried. when ever i restart my Mobile, i am loosing recent apps and data like call and sms history. eg. today is 25th Apr 2015. today i was restarted my mobile. after restart data and apps are