best way to learn java programming

Learn about best way to learn java programming, we have the largest and most updated best way to learn java programming information on alibabacloud.com

Java Classic Programming question 50-way 44

An odd number of 0~7 that can be composed.Analysis: The composition of 1 digits is 4, composed of 2 digits is 7*4, the composition of 3 digits is 7*8*4, composed of 4 digits is 7*8*8*4 ...public class Example44 {public static void Main (string[] args) {f ();}public static void F () {int sum = 4;Int J;System.out.println ("composed of 1 digits is" + sum + "one");sum = sum * 7;System.out.println ("composed of 2 digits is" + sum + "one");for (j = 3; J sum = sum * 8;System.out.println ("composition"

Java Classic Programming question 50-way eight

The value of S=A+AA+AAA+AAAA+AA...A, where a is a number. For example 2+22+222+2222+22222 (a total of 5 numbers are added at this time), several numbers are added by keyboard control.public class Example08 {public static void Main (string[] args) {SUM (2, 5);}public static void sum (int a, int n) {int b = A;Long sum = 0;for (int i = 0; i sum + = A;A = A * ten + B;}System.out.println ("and for:" + sum);}}Java Classic

Java Classic Programming question 50-way 12

The bonus paid by the enterprise under the Profit (I) is less than or equal to 100,000 yuan, the bonus can be raised 10%, the profit is higher than 100,000 yuan, below the 200,000 yuan, the part of less than 100,000 yuan by 10% commission, higher than 100,000 yuan portion, the Commission 7.5%, 200,000 to 400,000, higher than 200,000 yuan of the portion, A commission of 5%, 400,000 to 600,000, higher than 400,000 yuan, can be a commission of 3%, 600,000 to 1 million, the portion higher than 600,0

Java Classic Programming question 50-way 24

5 people sat together and asked how old the 5th person was, and he said he was 2 years older than the 4th person. Asked the age of 4th, he said he was 2 years older than the 3rd man. Asked the third person, who said he was two years older than the 2nd. Ask the 2nd person, who says two years older than the first one. Finally asked the first person, he said is 10 years old. How old is the fifth one?public class Example23 {public static void Main (string[] args) {Age ();}public static void Age () {

Java Classic Programming question 50-way 23

Give a positive integer of no more than 5 bits, requiring: ① to ask for a number of digits; ② print out the numbers in reverse order.public class Example24 {public static void Main (string[] args) {f (123789);}public static void F (long L) {String s = long.tostring (l);Char[] C = S.tochararray ();int j = C.length;SYSTEM.OUT.PRINTLN (L + "is a" + j + "bit number.) ");System.out.print (l + "output in reverse order is:");for (int i = j-1; I >= 0; i--) {System.out.print (C[i]);}}}

Java Classic Programming question 50-way 28

Sorts 10 numbers.public class Example28 {public static void Main (string[] args) {Int[] s = {5, 7, 6, 1, 9, 4, 2, 3, 8};Bubblesort (s);}public static void Bubblesort (int[] a) {System.out.print ("Original array is:");for (int i:a) {System.out.print (i+ "");}for (int i = 0; i for (int j = 0; J if (A[j] > a[j + 1]) {int temp = A[j];A[J] = a[j + 1];A[j + 1] = temp;}}}System.out.print ("\ n the sorted array is:");for (int i:a) {System.out.print (i+ "");}}}Java

Java Classic Programming question 50-way 17

Monkey Eat Peach Problem: The first day the monkey took off a number of peaches, immediately ate half, not enjoyable, and ate one more, the next morning, the remaining peaches eaten half, but also eat one more. Every morning after eating the rest of the day half of the zero one. By the 10th morning when I wanted to eat again, there was only one peach left. Ask how many peaches were picked on the first day.public class Example17 {public static void Main (string[] args) {int sum = Peach (1);System

Java Classic Programming Question 50-way 26

Please enter the first letter of the day of the week to determine the day of the week, if the first letter, then continue to judge the second letter.public class Example26 {public static void Main (string[] args) {f ();}public static void F () {System.out.println ("Please enter the first capital letter of the Week:");char ch = getChar ();Switch (CH) {Case ' M ':SYSTEM.OUT.PRINTLN ("The letter corresponds to the Monday. "); break;Case ' W ':SYSTEM.OUT.PRINTLN ("The letter corresponds to the Wedne

Java Classic Programming question 50-way 27

The number of primes within 100.public class Example27 {public static void Main (string[] args) {Prime ();}public static void prime () {System.out.print (2 + "\ T");System.out.print (3 + "\ T");int count = 2;Boolean flag = false;for (int i = 2; I for (int j = 2; J if (i% j = 0) {Flag = false;Break} else {Flag = true;}}if (flag) {count++;System.out.print (i + "t");if (count% 10 = = 0) {System.out.println ();}}}System.out.println ("\ n Total" + count + "number of primes.) ");}}

Java Classic Programming question 50-way 19

Print out the case (diamond)****************************public class Example19 {public static void Main (string[] args) {Display (5);}public static void display (int h) {for (int i = 0; I for (int j = 0; J System.out.print ("");}for (int k = 1; k System.out.print ("*");}System.out.println ();}for (int i = 1; I for (int j = 1; J System.out.print ("");}for (int j = 0; J System.out.print ("*");}System.out.println ();}}}Java Classic

Java Classic Programming question 50-way 32

Takes an integer a from the right end of the 4~7 bit.public class Example32 {public static void Main (string[] args) {Cut (123456789);}public static void Cut (long n) {String s = long.tostring (n);Char[] C = S.tochararray ();int j = C.length;if (J SYSTEM.OUT.PRINTLN ("Input Error! ");} else {System.out.println ("Intercept the 4~7 bit starting from the right side is:" + c[j-7] + c[j-6]+ c[j-5] + c[j-4]);}}}Java Classic

Java Classic Programming question 50-way 38

Write a function: When the input n is even, call the function to 1/2+1/4+...+1/n; When input n is odd, the function 1/1+1/3+...+1/n is called.public class Example38 {public static void Main (string[] args) {Double d = SUM (3);SYSTEM.OUT.PRINTLN ("The result of the operation is:" + D);}public static double sum (int n) {Double sum = 0.0;if (n% 2 = = 0) {for (int i = 2; I sum + = 1.0/i;}} else {for (int i = 1; I sum + = 1.0/i;}}return sum;}}Java Classic

Java Classic Programming question 50-way 43

An even number is always represented as a sum of two primes.public class Example43 {public static void Main (string[] args) {f ();}public static Boolean fun (int a) {Boolean flag = false;if (a = = 3) {Flag = true;return (flag);}for (int i = 2; I If (a% i = = 0) {Flag = false;Break} elseFlag = true;}return (flag);}public static void F () {Scanner s = new Scanner (system.in);int n, I;do {System.out.print ("Please enter an even number greater than or equal to 6:");n = s.nextint ();} while (N for (i

Java Classic Programming question 50-way 48

A company uses a public telephone to pass data, the data is a four-bit integer, is encrypted during delivery, encryption rules are as follows: Each digit is added 5, and then divided by the remainder of 10 instead of the number, and then the first and fourth exchange, the second and third exchange.public class Example48 {public static void Main (string[] args) {f (2345);}public static void f (int num) {Int[] C = new Int[4];if (num > 999 num C[0] = num/1000;C[1] = (num/100)% 10;C[2] = (NUM/10)%

Java Classic Programming question 50-way 41

There were a bunch of peaches on the beach and five monkeys. The first monkey divided the pile of peaches into five, and one more, and the monkey threw one more into the sea and took a copy. The second monkey divided the remaining peaches evenly into five pieces, and one more, it also threw a lot of one into the sea, took a copy. The third, the fifth and the other monkeys are doing so. Q. How many peaches do you have at least on the beach?public class Example41 {public static void Main (string[]

Java Classic Programming question 50-way 42

809*?? =800*?? +9*?? +1, where?? The two-digit number represented, 8*?? The result is a two-digit number, 9*?? The result is a 3-digit number. Please?? represent the double digits, and 809*?? After the result.public class Example42 {public static void Main (string[] args) {f ();}public static void F () {int a = 809, b, I;for (i = ten; I b = i * A;if (8 * I System.out.println ("\"?? \ "Representative:" + i);System.out.println ("809*" + i + "=" + "800*" + i + "+" + "9*"+ i + "=" + B);}}}}

Java Classic Programming question 50-way 36

There are n integers, so that they move backward in order of m positions, and the last m number becomes the first number of M.public class Example36 {public static void Main (string[] args) {Int[] m = {18, 12, 23, 34, 95, 76, 57, 28, 9};Moveelement (M, 5);}public static void Moveelement (int[] m, int n) {System.out.print ("The array before the shift is:");for (int r:m) {System.out.print (R + "");}if (n Int[] B = new Int[m.length];for (int i = 0; i B[i + N] = M[i];}int j = 0;for (int i = m.length

Java Classic Programming question 50-way 47

Reads an integer value of 7 numbers (1~50), and each time a value is read, the program prints the number of the value *.public class Example47 {public static void Main (string[] args) {Int[] A = {10, 7, 6, 15, 4, 3, 20};Display (a);}public static void display (int[] a) {System.out.print ("The integer Read is:");for (int r:a) {System.out.println (R + "");}for (int i = 0; i System.out.print ("print" + a[i] + "X *:");for (int j = 0; J System.out.print ("*");}System.out.println ();}}}

Learn Python find it difficult to learn a programming language, what are the methods or techniques to learn programming?

necessarily the language itself.(such as grammar syntax, etc.), but The whole idea of programming and the structure of programming。 As a matter of fact, the syntax and manipulation of the Python language you're learning, compared to languages such as C + + and Java, is for beginners. relatively simple to get started withThe Before you

Teenagers learn Java and other programming development courses is a stupid fashion [figure]

Teenagers learn Java and other programming development courses is a stupid fashion [image]:This article only represents a different voice, does not represent the majority of people's opinion, let the children sit in front of the computer to tap the keyboard, master their parents dream skills. God, nothing is more desirable than to teach our children to write code

Total Pages: 15 1 .... 3 4 5 6 7 .... 15 Go to: Go

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.