Senin, 28 September 2015

Step to calculate how many value of String??

Hello friends, i have something for you. Do you know?
ok, will we begin to calculate how many value of String?
First, we must write the coding, like this :
Are you need explanation about that? If you needed, i can tell for you.
if you look this code like :
/**
.......
.......
**/
that is not code to command code of java, but to write about explanation only.

And after that, we will import the GUI to looked, we write like this :

import javax.swing.JOptionPane;


Now, we begin to create class name "homework", and object "a" as value of string etc.
public class homework{ /** tell you how do you create a class **/
public static void main(String[] args){ /** tell you how do you run the program **/
String a; /** tell you how do you create a object with name 'a' **/
a=JOptionPane.showInputDialog("insert your string : "); /** tell you how do you create declaration a variable **/
JOptionPane.showMessageDialog(null,"How many your string = "+a.length()); /** tell you to print about value**/

}

after that, you can run by F5 or other agree with application. and if you will be look like this :
insert your text, and click ok. and you will be look like this :
ok.. Finish..
please, give me command about that.


Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 komentar

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© 2011 Micro Aisle
Designed by Didik Maryono
Posts RSSComments RSS
Back to top