<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://code-reference.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://code-reference.com/feed.php">
        <title>Programming | Library | Reference - Code-Reference.com</title>
        <description></description>
        <link>https://code-reference.com/</link>
        <image rdf:resource="https://code-reference.com/ttps://code-reference.com/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-06-21T06:38:49+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://code-reference.com/java/io/printstream/format?rev=1366011044&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/classes/extends?rev=1366963338&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/loops/for?rev=1366269081&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner?rev=1369672518&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner/nextshort?rev=1365581695&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/math/random?rev=1708042323&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner/nextint?rev=1365581650&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/control_structures/switch?rev=1365602129&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner/nextlong?rev=1365581680&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/datatypes?rev=1515738546&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/control_structures/continue?rev=1708041837&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/bash/case?rev=1708040895&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner/nextfloat?rev=1365581634&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/system/exit?rev=1708042324&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner/nextline?rev=1365581665&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/variables/global_variable?rev=1708041842&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/string/tolowercase?rev=1365581466&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/control_structures/if?rev=1365582955&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/string/touppercase?rev=1365581482&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/variables/array?rev=1366179085&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/math/round?rev=1365581526&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/string/charat?rev=1365581451&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/loops/while?rev=1365667420&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/control_structures/else?rev=1708041838&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/control_structures/break?rev=1708041837&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/util/scanner/nextdouble?rev=1365581618&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/loops/do?rev=1515738547&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/string/toarray?rev=1366267847&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/java/lang/string/replace?rev=1708042325&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://code-reference.com/ttps://code-reference.com/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Programming | Library | Reference - Code-Reference.com</title>
        <link>https://code-reference.com/</link>
        <url>https://code-reference.com/ttps://code-reference.com/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://code-reference.com/java/io/printstream/format?rev=1366011044&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-15T09:30:44+02:00</dc:date>
        <title>format</title>
        <link>https://code-reference.com/java/io/printstream/format?rev=1366011044&amp;do=diff</link>
        <description>format args to the format string format and write the result to the stream


format(String format, Object... args);

return value: stream

 sign  Description  0 if the place is not busy they prints a 0	# if the place is not busy they prints nothing	. decimal separator Separates and decimal places.	, Groups the numbers (a group is as large as the distance from ”,” to ”.”).	; Delimiter. To the left of the pattern is positive, the right for negative numbers.	- The default character for the negative…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/classes/extends?rev=1366963338&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-26T10:02:18+02:00</dc:date>
        <title>extends</title>
        <link>https://code-reference.com/java/classes/extends?rev=1366963338&amp;do=diff</link>
        <description>extends extends an already existing class with custom methods


package myclass.mydate;

import java.util.Date;

/* 
 * extends Date = extends class java.util.Date 
 * java.util.Date must be importet 
 */
public class MyDate extends Date { 

    public int getFullYear() {
        
        return this.getYear() + 1900;
    }
    

    
// overrride the method getMonth from java.util.Date

    @Override
    public int getMonth() {
        return 99;
    }    
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/loops/for?rev=1366269081&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-18T09:11:21+02:00</dc:date>
        <title>for</title>
        <link>https://code-reference.com/java/loops/for?rev=1366269081&amp;do=diff</link>
        <description>for ( init; condition; increment ){
    statements;    
    }


description of for

a for loop do statements while the condition is true/untrue, the increment counts the loop, it is possible to use more than 1 condition in the for loop

example 1 of for in java




package codereferececomjava;
 
public class CodeRefereceComJava {
 
 
    public static void main(String[] args) {
        
        int myOtherCount=5;
 
 
        for (int i = 0; i &lt;= myOtherCount; i++) {
            System.out.print…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner?rev=1369672518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-05-27T18:35:18+02:00</dc:date>
        <title>Scanner()</title>
        <link>https://code-reference.com/java/util/scanner?rev=1369672518&amp;do=diff</link>
        <description>Reads input from a Keyboard, or a Device

CODE_SIGN_IDENTITY

--verify

--file-list

--display -r- Terminal.app

example Scanner in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        double currency, amount, exchangeRate;
        String currencyName, newCurrency;
                
       …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner/nextshort?rev=1365581695&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:14:55+02:00</dc:date>
        <title>nextShort()</title>
        <link>https://code-reference.com/java/util/scanner/nextshort?rev=1365581695&amp;do=diff</link>
        <description>public short nextShort()


return short scanned from the input

example nextShort() in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        short currency;
                
        System.out.print(&quot;Please enter a number: &quot;);
        currency = scan.nextShort(); // read keyboard buffer
   …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/math/random?rev=1708042323&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:12:03+02:00</dc:date>
        <title>Math.random()</title>
        <link>https://code-reference.com/java/lang/math/random?rev=1708042323&amp;do=diff</link>
        <description>Math.random() double;


generate a 'double' random number

example of Math.random in java


package codereferececomjava;

public class CodeRefereceComJava {

 
    public static void main(String[] args) {
    
        double randomDigit;
        randomDigit = Math.random();
        System.out.println(randomDigit); // random number as double
        System.out.println(randomDigit*1000+1); //double random number between 1-1000
        System.out.println((int)(randomDigit*1000+1)); //double random …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner/nextint?rev=1365581650&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:14:10+02:00</dc:date>
        <title>nextInt()</title>
        <link>https://code-reference.com/java/util/scanner/nextint?rev=1365581650&amp;do=diff</link>
        <description>public int nextInt()


return int scanned from the input

example nextInt in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        int currency;
                
        System.out.print(&quot;Please enter a number: &quot;);
        currency = scan.nextInt(); // read currency
        
        System.…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/control_structures/switch?rev=1365602129&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T15:55:29+02:00</dc:date>
        <title>switch</title>
        <link>https://code-reference.com/java/control_structures/switch?rev=1365602129&amp;do=diff</link>
        <description>The switch statement is a multi-select control structure. An expression is evaluated once and compared to 'constants'. In case of equality, the 'statements' that come after the 'constant' are processed. In switch 'statements' can only ordinary data types (ie, 'int', 'long', char, short, etc.) can be used.</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner/nextlong?rev=1365581680&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:14:40+02:00</dc:date>
        <title>nextLong()</title>
        <link>https://code-reference.com/java/util/scanner/nextlong?rev=1365581680&amp;do=diff</link>
        <description>public long nextLong()


return long scanned from the input

example nextLong() in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        long currency;
                
        System.out.print(&quot;Please enter a number: &quot;);
        currency = scan.nextLong(); // read keyboard buffer
        
…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/datatypes?rev=1515738546&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-01-12T07:29:06+02:00</dc:date>
        <title>Declaration Dataypes</title>
        <link>https://code-reference.com/java/datatypes?rev=1515738546&amp;do=diff</link>
        <description>package datatypes;

public class DataTypes {

    public static void main(String[] args) {
        // primitiv Datatypes
        
        boolean aa = true;     // 1 bit
        char bb = 'A';         // 2 Bytes
        char cc = 65;          // 2 Bytes
        byte dd = 12;          // 1 Byte -128 - +127
        short ee = 234;        // 2 Bytes -32768 - +32767
        int ff = 4711;         // 4 Bytes
        long gg = 34567;       // 8 Bytes
        float hh = 3.14f;      // 4 Bytes
        d…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/control_structures/continue?rev=1708041837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:03:57+02:00</dc:date>
        <title>continiue</title>
        <link>https://code-reference.com/java/control_structures/continue?rev=1708041837&amp;do=diff</link>
        <description>continiue;


continiue breaks a loop at a given point and continiue the loop

example of continiue in java


package codereferececomjava;

public class CodeRefereceComJava {

 
    public static void main(String[] args) {

        int i;
        for (i=40;i&lt;=45;i++) {
            if (i==42) continue;
            System.out.println(&quot;The answer is probably not &quot;+i);
        }
 
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/bash/case?rev=1708040895&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T00:48:15+02:00</dc:date>
        <title>case</title>
        <link>https://code-reference.com/bash/case?rev=1708040895&amp;do=diff</link>
        <description>case

The case and select constructs are technically not loops, 
since they do not iterate the execution of a code block. Like loops,
however, they direct program flow according to conditions at the top or bottom of the block.

Controlling program flow in a code block

case (in) / esac

The case construct is the shell scripting analog to switch in C/C++. 
It permits branching to one of a number of code blocks, depending on condition tests. 
It serves as a kind of shorthand for multiple if/then/e…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner/nextfloat?rev=1365581634&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:13:54+02:00</dc:date>
        <title>nextFloat()</title>
        <link>https://code-reference.com/java/util/scanner/nextfloat?rev=1365581634&amp;do=diff</link>
        <description>public float nextFloat()


return float scanned from the input

example nextFloat in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        float currency;
                
        System.out.print(&quot;Please enter a number: &quot;);
        currency = scan.nextFloat(); // read currency
        
   …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/system/exit?rev=1708042324&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:12:04+02:00</dc:date>
        <title>exit</title>
        <link>https://code-reference.com/java/lang/system/exit?rev=1708042324&amp;do=diff</link>
        <description>public static void exit(int status)


exit a programm with a return code 

example exit in java


package test;

public class Test{

    public static void main(String[] args) {
        

        System.out.println(&quot;Example for exit in java&quot;);
        System.exit(1);
        System.out.println(&quot;sorry but this is after our exit&quot;);


    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner/nextline?rev=1365581665&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:14:25+02:00</dc:date>
        <title>nextLine()</title>
        <link>https://code-reference.com/java/util/scanner/nextline?rev=1365581665&amp;do=diff</link>
        <description>public String nextLine()


return the scanned content from the input

example nextLine() in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        String line;
                
        System.out.print(&quot;Please enter what you want: &quot;);
        line = scan.nextLine(); // read keyboard buffer
 …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/variables/global_variable?rev=1708041842&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:02+02:00</dc:date>
        <title>global variable</title>
        <link>https://code-reference.com/java/variables/global_variable?rev=1708041842&amp;do=diff</link>
        <description>define a global variable in java, after the public class block

example of global varialbe  in java


 package codereferececomjava;

public class CodeRefereceComJava {

    public static int globalDigit; // define a global variable
 
    public static void main(String[] args) {
                
        int digit = 5; // define and inital a local variable
        globalDigit = digit; // initalisize the global variable
        
        funct(); // call funct();
    }

    
    public static void f…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/string/tolowercase?rev=1365581466&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:11:06+02:00</dc:date>
        <title>toLowerCase</title>
        <link>https://code-reference.com/java/lang/string/tolowercase?rev=1365581466&amp;do=diff</link>
        <description>toLowerCase()
toLowerCase(locale);




description of toLowerCase

returns the String, converted to lowerspace.

example of toLowerCase in java



package lang;

public class Lang {

    public static void main(String[] args) {
        
        String str = &quot;TEST 1234&quot;;
        
        str = str.toLowerCase();
        // str = str.toLowerCase(Locale.SIMPLIFIED_CHINESE); // for Simplified Chinese
        
        System.out.println(str+&quot; in lowercase&quot;);
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/control_structures/if?rev=1365582955&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:35:55+02:00</dc:date>
        <title>if</title>
        <link>https://code-reference.com/java/control_structures/if?rev=1365582955&amp;do=diff</link>
        <description>if ( condition == true ){
    command;    
 }


check if a condition is true or false

example of if in java




package plausibilitycheck;

import java.util.Scanner;

public class Plausibilitycheck{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        int celsius;
        double fahrenheit;

        Scanner scan = new Scanner(System.in);

        System.out.print(&quot;Please type in Celsius : &quot;);
        celsius = scan.nextInt();

    …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/string/touppercase?rev=1365581482&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:11:22+02:00</dc:date>
        <title>toUpperCase</title>
        <link>https://code-reference.com/java/lang/string/touppercase?rev=1365581482&amp;do=diff</link>
        <description>toUpperCase()
toUpperCase(locale)


description of toUpperCase

returns the String, converted to uppercase.

example of toUpperCase in java



package lang;

public class Lang {

    public static void main(String[] args) {
        
        String str = &quot;test 1234&quot;;
        
        str = str.toUpperCase();
        // str = str.toUpperCase(Locale.SIMPLIFIED_CHINESE); // for Simplified Chinese
        
        System.out.println(str+&quot; in uppercase&quot;);
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/variables/array?rev=1366179085&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-17T08:11:25+02:00</dc:date>
        <title>Arrays in Java</title>
        <link>https://code-reference.com/java/variables/array?rev=1366179085&amp;do=diff</link>
        <description>an array, it is a object variable (box,container), which is a variable in a position to take up more than one object of the same type and manage it

example of arrays in java


package arrays;

public class Arrays {

    public static void main(String[] args) {
           int[] digits1; // Reference Variable
           int[] digits2= new int[5]; // Definition with 5 x Integer
           int[] digits3= {1,2,3,4,5}; // Definie with initialization ( 5 Integer)
           
           // pass Element…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/math/round?rev=1365581526&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:12:06+02:00</dc:date>
        <title>Math.round</title>
        <link>https://code-reference.com/java/lang/math/round?rev=1365581526&amp;do=diff</link>
        <description>rounds a number 

example of round in java



package roundanumber;
import java.lang.Math;

public class Roundanumber {


    public static void main(String[] args) {
        // TODO code application logic here
        
        double number, number2;
        number = 33.384422;
        number2 = 33.898823;
    
    System.out.println(&quot;number: &quot; + Math.round(number));
    System.out.println(&quot;number2: &quot; + Math.round(number2));
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/string/charat?rev=1365581451&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:10:51+02:00</dc:date>
        <title>charAt</title>
        <link>https://code-reference.com/java/lang/string/charat?rev=1365581451&amp;do=diff</link>
        <description>charAt(int index)


description of charAt

returns char value at the specified index of  string.

example of charAt in java



package lang;

public class Lang {

    public static void main(String[] args) {
        
        String str = &quot;test 1234&quot;;
        char chr;
        
        chr = str.charAt(1);
        
        System.out.println(chr+&quot; is the 2 char&quot;);
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/loops/while?rev=1365667420&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-11T10:03:40+02:00</dc:date>
        <title>while</title>
        <link>https://code-reference.com/java/loops/while?rev=1365667420&amp;do=diff</link>
        <description>while (condition) {

//command

}


a while loop do something while a condition

example of while loop in java


package codereferececomjava;

public class CodeRefereceComJava {
 
    public static void main(String[] args) {

        int i=4;
              
        while(i==4) {
        
             i++;
         }
         
        System.out.println(&quot;i is :&quot; + i );
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/control_structures/else?rev=1708041838&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:03:58+02:00</dc:date>
        <title>else</title>
        <link>https://code-reference.com/java/control_structures/else?rev=1708041838&amp;do=diff</link>
        <description>if ( condition == true ){
    command;    
 } else {
      // if the &quot;if&quot; condition false
      command;
      }


check if a condition is true or false

example of else




package plausibilitycheck;

import java.util.Scanner;

public class Plausibilitycheck{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        int celsius;
        double fahrenheit;

        Scanner scan = new Scanner(System.in);

        System.out.print(&quot;Please …</description>
    </item>
    <item rdf:about="https://code-reference.com/java/control_structures/break?rev=1708041837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:03:57+02:00</dc:date>
        <title>break</title>
        <link>https://code-reference.com/java/control_structures/break?rev=1708041837&amp;do=diff</link>
        <description>break;


continiue breaks a loop at a given point and exit the loop

example of break in java


package codereferececomjava;

public class CodeRefereceComJava {

 
    public static void main(String[] args) {

        int i;
        for (i=42;i&lt;=45;i++) {
            if (i==43) break;
            System.out.println(&quot;The answer is probably &quot;+i);
        }
 
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/util/scanner/nextdouble?rev=1365581618&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-10T10:13:38+02:00</dc:date>
        <title>nextDouble()</title>
        <link>https://code-reference.com/java/util/scanner/nextdouble?rev=1365581618&amp;do=diff</link>
        <description>public double nextDouble()


double scanned from the input

example nextDouble in java


package scanner;

import java.util.Scanner;

public class Scanner {

    public static void main(String[] args) {
        
        /* Create Scanner Object for the input from the keyboard */
        Scanner scan = new Scanner(System.in); 
        
        double currency, amount, exchangeRate;
        String currencyName, newCurrency;
                
        System.out.print(&quot;Please enter the amount (with d…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/loops/do?rev=1515738547&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-01-12T07:29:07+02:00</dc:date>
        <title>do</title>
        <link>https://code-reference.com/java/loops/do?rev=1515738547&amp;do=diff</link>
        <description>do {
 command;
} while (condition);



a do loop will run while a condition is false

example of do loop in java


package codereferececomjava;

public class CodeRefereceComJava {
 
    public static void main(String[] args) {
    
        int i=4;
        
        do {
         i++;
        } while(i==4);
        
        System.out.println(&quot;i is :&quot; + i );
    }
}</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/string/toarray?rev=1366267847&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-04-18T08:50:47+02:00</dc:date>
        <title>toCharArray</title>
        <link>https://code-reference.com/java/lang/string/toarray?rev=1366267847&amp;do=diff</link>
        <description>public char[] toCharArray()


description of toCharArray()

converts a string to a new character array

example of toCharArray in java


package codereferececomjava;

public class CodeRefereceComJava {


    public static void main(String[] args) {
        String str = &quot;some Text&quot;;
        char[] text;
       
        
        System.out.println(str); // print the String

        text = str.toCharArray();
        for (int i = 0; i &lt;= text.length - 1; i++) {
            
        System.out.printl…</description>
    </item>
    <item rdf:about="https://code-reference.com/java/lang/string/replace?rev=1708042325&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:12:05+02:00</dc:date>
        <title>replace</title>
        <link>https://code-reference.com/java/lang/string/replace?rev=1708042325&amp;do=diff</link>
        <description>public String replace(CharSequence target, CharSequence replacement)


description of replace

this method is used to replace a char Sequence

example of replace in java


package replace;

public class ReplaceString {

    public static void main(String[] args) {

        String str = &quot;Hello&quot;;
    
        str = str.replace(&quot;el&quot;, &quot;xx&quot;);
        System.out.println(&quot;String after replacement :&quot;+  str );
    
    
    }
}</description>
    </item>
</rdf:RDF>
