... how can i use 'enter' in java (text) -.-

Hi all,
first the simple version;
How can i use 'enter' in java. Like turn HELLO into
H
E
L
L
O
The not so simpler version IF needed;
I have the following piece of code;'
if (line.startsWith("Monday")) {
     String subjectsMonday = " math and philosophy";
     Calendar c = Calendar.getInstance();
          System.out.format("School begins at" +" 08:10", c, c, c);
          System.out.format(" school ends at " +" 15:55", c, c, c);
     System.out.println("We have the following subjects;" + subjectsMonday);the thing is ... i want the text "we have the following subject; math and philosophy" to start at a new line.
HOW am i supposed to do that.

%n may work for you:
        String subjectsMonday = " math and philosophy";
        Calendar c = Calendar.getInstance();
        System.out.format("School begins at" + " 08:10%n", c, c, c);
        System.out.format(" school ends at " + " 15:55", c, c, c);
        System.out.println("We have the following subjects;" + subjectsMonday);

Similar Messages

  • How can I use javascript in a Text Area with HTML editor??

    My question is... how can I use javascript in Text Area with HTML editor??
    I can use javascript functions that change the content of Text Areas but i can´t if i try in text area with html editor....
    I need to limit number of characters in a text area with html editor and i can´t.
    could anybody help me please?

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • Adobe is asking for Java SE 6 runtime. How can I use Oracle's Java 7 instead?

    Platform: Mac OS X, version 10.9.2 (the latest available as of May 11, 2014)
    When trying to open my old Adobe Illustrator, as part of Creative Suite CS4, I get the following error message:
    To open "Adobe Illustrator CS4," you need a Java SE 6 runtime. Would you like to install one now?
    I have the latest Oracle Java 7 (Version 7 Update 55) installed and I don't want the historic Apple Java 6. How can I configure Adobe software to use the already installed Java 7?
    Best, regards
    Tom

    despite this being for a different os, read (especially the end paragraphs) Install Java (JRE) | Mac OS 10.7 Lion

  • How can I use HyperLink In Java Applet..

    I am new In Java Programming And i Want to create a Hyperlink OR URL in java Applet, How can be It possible?

    well u can use a hyperlink as a url by using url from java.net.url class
    define ur url .... u can check the API fo r that
    and by using wht u mean .. u want to browse in applet with that url or wht
    if u want to do browing in applet than u will also have to do parsing of all HTML tags
    hope it will help u

  • How can i use enter key

    hello
    how can i make that when i press enter key that will be like the press of the button
    thanks

    hello
    how can i make that when i press enter key that will be like the press of the button
    thanks
    You can use a keyboard hook, although I don't have much experience in this area. 
    Check a
    google search to see if you can find something helpful.
    “If you want something you've never had, you need to do something you've never done.”
    Don't forget to mark
    helpful posts and answers
    ! Answer an interesting question? Write a
    new article
    about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.

  • How can I use JAXB on Java 1.4?

    My code is developed on 1.4 and my firm has not upgraded to 1.5 yet.
    Can I use JAXB?
    All I see on web is JAXB2.0 hat requires Java 1.5.
    What can I do? Is there any pre-2.0 release of JAXB - I am sure they had JAXB before Java 1.5
    Please shed some light, thanks.

    https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=4868
    Turadg Aleahmad:
    Could JAXB2 work in JSE 1.4 if it was run through Retrotranslator?
    http://retrotranslator.sourceforge.net/
    Kohsuke Kawaguchi:
    It isn't officially supported, but it actually works. Yes, use retrotranslator.
    You'd also have to use @xexplicitAnnotation="true" (for Ant) and use
    -XexplicitAnnotation for CLI to work around some of the issues.

  • How can i use the operationsComplete JAVA API in EJB2.0

    Hello guys,
    My Issue is cleaning the EJB Cache. some guys saying using JAVA API like operationsComplete like the follwing
    weblogic.ejb.interfaces.EJBLocalObject
    public.void.operationsComplete()
    weblogic.ejb.EJBObject
    public.void.operationsComplete()
    Please reffer the link below
    (http://e-docs.bea.com/wls/docs92/ejb/entity.html#wp1194003)
    Understanding Passivation of Entity Beans
    Entity beans that are involved in transactions can be passivated when necessary in order to attempt to prevent a CacheFullException when an attempt is made to insert an entity bean into a cache that is full. Passivation is handled automatically by the EJB container and you do not need to change the way you program EJBs in order to take advantage of this feature. However, you can optionally program your EJBs to communicate to the cache that they are done performing all operations in the current transaction. The cache can then make use of this information when evaluating beans for the possibility of passivation.
    To optionally program EJBs to notify their cache that they are done performing operations in the current transaction, you can use the operationsComplete Java API as follows:
    weblogic.ejb.interfaces.EJBLocalObject
    public.void.operationsComplete()
    weblogic.ejb.EJBObject
    public.void.operationsComplete()
    It would be great help if any guy give me a solution.
    Thanks in Advance
    Rajasekhar

    Netweaver is comprised of different components...
    in WAS ABAP.. if you go to SPAM.. and select imported support packages and click display..
    You will see list of components.. some of the components you might see at same level and some follow different paths...
    ex:
    SAP_OCS  - > SPAM/SAINT UPDATE 24
    SAP_BASIS -> Support pacakage 13 for 7.0
    SAP_ABAP-> Support pacakge 13 for 7.0
    and the same way you can find different components in java engine...
    http://<host>:<port>/sap/monitoring/SystemInfo
    You can upgrade each of them by individual support packages.. or you can upgrade stack by stack..
    stack is collection of supporpt packages...
    If you follow stack.. then you can tell that you at NW04S Support stack 10 or 11... if you upgrade by support package always it is collection of versions of different support packs in your system...
    Please do come back if you require any further information..
    Award points if this reply found useful

  • How can i use twain from java servlet?

    dear all
    iam a web developer ,iam haviving now a task to search in point pf scanning image through web (Intranet) using java
    can any one tell where can i find resources how to deal with Twain using java (On web specially not from a desktop application)
    i hope u can help me
    Thanks in advance
    Yours,
    Amr
    Senior Java Web developer

    Hi,
    You can try a package named: JTwain, which is available at http://asprise.com/product/jtwain.
    JTwain supports all kinds of digital cameras and scanners. You can use Java to access, contorl digital cameras and scanners, and of course, to acquire images with flexible settings.
    The developers' guide is available @ http://asprise.com/product/jtwain/devGuide.php
    In the simplest case, one line of Java code can solve your problem.
    Good luck!

  • How can I use "enter" on a bluetooth keyboard to send iMessages?

    I just purchased the Logitech folio case with Bluetooth keyboard for my iPad. When using iMessage and texting apps, for some reason when I hit the enter key I cannot send the message I have to rather tap the send button on the screen. Is there a setting I need to change? It works fine when I hit enter to search when I'm on the internet. The key itself has "return" as its first function and "enter" as its second. I tried hitting "shift" and another time "fn" before with no luck. I feel stupid for asking this question but who knows someone else might be having the same problem. Any advice?

    I tried to find a way I tried pressing most of the buttons on my Bluetooth keyboard but nothing works
    So the only way you could send is by pressing it manually on the screen

  • How can I use tomcat with Java ServerFaces

    Is there a tutorial on Java ServerFaces using tomcat?

    the JWSDP1.3 download includes Tomcat
    Follow links from here - http://java.sun.com/webservices/index.jsp
    NOTES
    #1 JWSDP1.3 includes a Beta release of Tomcat 5
    So you may want to also download the latest version from the apache/Tomcat websites
    http://jakarta.apache.org/tomcat/index.html
    #2 JWSDP1.3 contains JSF EA4 - JSF 1.0 Beta is now available
    follow the link on the JWSDP web site above

  • How can i use text expander with the new Mavericks,

    how can i use text expander with the new Mavericks,

    I regret upgrading to mavericks for the same reason
    ftamez wrote:
    how can i use text expander with the new Mavericks,
    Now I have been searching - and you have to buy an app and it will cost you $34.99 (what a rip off)

  • How can i use or embed  the ' C'  language in java

    thanks a lot friends for your suggestion on using 'c' language to implement the control of the keyboard ie. to prevent a key stroke of : ctrl+alt+delete keys from closing a running java application. i was advised that it won't be possible to implement this with java language, the use of 'C' language was suggested. i then wish to ask the following:
    1. how can i use 'C'language in a java program and be able to compile to program so that the resultant program can help me prevent the closing of my java-application when the user of the application presses the following keys : ctrl+alt+delete. i don't even know the c language at all. how can i start and how can i combine the resultant code with java.
    2. i'm thinking of creating an application that retrieves information from a database, like microsoft sql or oracle, and displays the resultant data from a table, say STUDENT TABLE, in a java application using the JTable class. i don't even know how to use this JTable but i've seen it used and know it will suit what i have in mind.
    3. how can i make the table dynamic, ie. how can i make the table to immediately register / show the result of an update to the 'STUDENT' table in the database.
    4. THANKS FOR YOUR HELP IN ADVANCE. i will most appreciate it if you can give me a sample code or a site where i download one. once again thanks.

    Good luck disabling Ctrl+Alt+Del! I've read quite a bit about it, and at least on Windows 2000 (not sure about NT) or higher, disabling it is next to impossible. Problem is CAD is a system command, and the OS doesn't even send the keys to the active program. Ctrl+Alt+Del is handled by the GINA (Graphical Identification and Authentication) DLL installed on the system. You'll have to write and export the functions you need and change the GINA DLL used by the system to your own. Bear in mind that any small mistake in the dll can cause you to lose access to your computer if you haven't taken precautions!
    On Windows 95/98, disabling Ctrl+Alt+Del is fairly easy as you just have to write some simple native code to fool the system that a password protected screensaver is running.
    I've provided a link regarding winlogon and GINA here, but you've been forewarned!
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/winlogon_and_gina.asp

  • How can I use table control to enter data

    Hi all,
    I want to use table control to enter data, instead of using textboxes.
    So that the user can enter many data at once and just click the save button at the end of the work, only one click.
    How can I use the table control at this context?
    Thanks.
    Deniz.

    Hi deniz,
    go through it:
    /people/ravishankar.rajan/blog/2007/02/23/an-easier-way-of-displaying-and-editing-data-using-table-control
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/code%2bto%2bhandle%2bmultiple%2brecords%2bin%2bbdc%2btable%2bcontrol
    Regards,

  • How can I use Seeburger java functions on SAP XI's user defined functions?

    Hi All,
    As my title implies; how can I use Seeburger java functions on SAP XI's user defined functions?  I've tried searching over the net in tutorials regarding this topic but I failed to find one; can someone provide me information regarding my question? thanks very much.
    best regards,
    Mike

    Hi Mike !
    You should check your documentation about which java classes you need to reference in the "import" section of your UDF. And also deploy the java classes into the java stack or include them as a imported archive in integration repository...it should be stated in the seeburger documentation.
    What kind of functions are you trying to use?
    Regards,
    Matias.

  • How can I use Greek symbols in a text in Pages? Greek symbols are not in the special character list.

    How can I use Greek symbols in a Pages text? Greek symbols are not included in the special character collection.
    I need to import for example a sigma from Word or Adobe illustrator and then Pages can recognise it. I can not find it from within Pages.

    Special character palette from the edit menu does have sigmas under European ... > Greek ...
    You can do a search at the bottom of the Special Character palette. Double click on the greek capital letter sigma. You will get a lot of sigmas.

Maybe you are looking for

  • HT3275 My Time Machine has stopped backing up and now it errors out everytime I make another attempt.

    My Time Machine has stopped working and now errors out everytime I try to re-connect ?

  • How to export the comp/interface to local hard disk

    hi all, can any one send me how to export the comp/interface to local hard disk thanks, viswa

  • Please help! programs freeze!

    My programs seem to freeze everytime I try to change the color of anything font/background/whatever it maybe. As soon as the color option window pops up for me to choose the color i want, then the program freezes and i have to force quit it. Im not v

  • 9iAS application server(Reports)

    sir , i am using oracle 9iAS on red hat linux 6.2 with oracle 8i database installed on the same machine. my form server is running fine. but when i try to run report server from the browser , nothing is shown in the screen except some words like : GI

  • Payslip rule

    Hi, I would like to know if it is possible to create a rule in payslip whereby i can specify logic as such: If WTXXXX is negative, do not show the amount, but show the amount of another wage type. If, yes, how should the command be written. Thanks. R