3.1 Jobs

Source: Internet
Author: User

Example 3.1

Class datademo01{
public static void Main (string[] args) {
int num = 99999999999999999999999d
}
}

Example 3.2

Class datademo02{
public static void Main (string[] args) {
int max = Integer.max_value;
SYSTEM.OUT.PRINTLN ("Maximum value of integer:" + max);
System.out.println ("Integer maximum + 1:" + (max + 1));
System.out.println ("Integer maximum + 2:" + (max + 2));
}
}

Example 3.3

public class datademo03{
public static void Main (string[] args) {
int max = Integer.max_value;
SYSTEM.OUT.PRINTLN ("Maximum value of integer:" + max);
System.out.println ("Integer maximum + 1:" + (max + 1));
System.out.println ("Integer maximum + 2:" + (max + 2L));
System.out.println ("Integer maximum + 1:" + ((long) max +2));
}
}

Example 3.4

public class datademo04{
public static void Main (string[] args) {
Char ch1 = ' a ';
Char CH2 = 97;
System.out.println ("ch1 =" + ch1);
System.out.println ("CH2 =" + CH2);
}
}

Example 3.5

public class datademo05{
public static void Main (string[] args) {
char ch1 = ' \ ';
char CH2 = ' \ \ ';
System.out.println ("ch1 =" +ch1);
System.out.println ("ch1 =" +ch2);
System.out.println ("\" Hello world\ "");
}
}

Example 3.6

public class datademo06{
public static void Main (string[] args) {
float num = 3.0f;
System.out.println ("Two decimals multiplied:" +num*num);
}
}

Example 3.7

public class datademo07{
public static void Main (string[] args) {
Boolean flag = true;
SYSTEM.OUT.PRINTLN ("flag =" +flag);
}
}

3.1 Jobs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.