IOPanel

  IOPanel > >

, , , , , .

:

java

+, ...
 
20-03-08, 23:41   #1 ( )
IO Member
 
   MasterBlaster
 
: Dec 2007
: 441
 java

+,

'?! ?!
:
' , , .
' .
?! .
.
(, , ....)
.

.

:

....
', ?!
:
1990
: , '.
.
5 (1995 ) , '.
:

':
: JDK - Java Development Kit ( ', )

:

( ) :
! () eclipse:

: dr.java, bluej .

,
.

:

:
' : , ( compile ) : 0 1 : 1101001.

, :

(class and objects):
:
... , .
.
"" ,
.
.

(encapsulation):
"" , : , , , '. ( ).

- (polymorphism):
, :
: 4+1=5
2+3=5 ? .
:
, - .

(inheritance):
: X, , .

, java :P



__________________
Cpu: Intel Core 2 Due E6600@2.4GHz
Motherboard: Gigabyte GA-965P-DS3
Memory: GSKILL 2GB DDRII 800MHZ DUAL CHANNEL
Video Card: Sapphire ATI 4850 512MB
Power Suplly: OCZ stealthXstream 600W
Monitor: 2 X LG L1953TR 19" LCD
Custom Built Water Cooling
htpc:
p4@1.8GHZ, 256mb ram, ASUS s533-mx, fx5200
MasterBlaster   
20-03-08, 23:43   #2 ( )
IO Member
 
   MasterBlaster
 
: Dec 2007
: 441

? ?
java
:
' :
?
Public class Classname
}
{
( ).
:
Classname
{} ( ) .
:
.
: %&*@ _ ( ).
:
" _ .
: , '. " :
/* */
: "
Tab
(
eclipse

( ).
main
public class Classname
}
(public static void main (String[] args
}
( )
{
{

():
' .
:
"" :
System.out.print
:
System.out.println

: (" ")
;
!
.

public class Classname
}
public static void main (String[] args)
}
;("!System.out.print("Hello world
;("!System.out.println("Hello world
;("!System.out.print("Hello world

{
{


'

!!!!!!
' :
;
.

:

(1
*
**
***
****
*****

2) :
( o o )
-o000----(_)----000o------

:
.
, .

char
16
'A' - 'Z', 'a' - 'z', '.
byte
8
128 -/+.
short
16
32,768 -/+.
int
32
2,147,483,648 -/+.
long
64
232 -/+.
float
32
(, ).
double
64
.
boolean
.


' .
(
Int
)

' :
Int ( )= ();
:

public class Classname
}
public static void main (String[] args)
}
;Int x=8

{
{
:
;(System.out.print("number: "+x
.

, :


public class Classname
}
(public static void main (String[] args
}
;Int num1=5
;Int num2= 3
;Int sum

;Sum=num1*num2

;(System.out.print("sum: "+sum

{
{
, , :
Sum


:
(double)
:
public class Classname
}
(public static void main (String[] args
}
;Int area,area1,zela,gova
;Area = (double)(zela*gova)/2
;Area1=(zeal*gova)/2.0
{
{



, ,


__________________
Cpu: Intel Core 2 Due E6600@2.4GHz
Motherboard: Gigabyte GA-965P-DS3
Memory: GSKILL 2GB DDRII 800MHZ DUAL CHANNEL
Video Card: Sapphire ATI 4850 512MB
Power Suplly: OCZ stealthXstream 600W
Monitor: 2 X LG L1953TR 19" LCD
Custom Built Water Cooling
htpc:
p4@1.8GHZ, 256mb ram, ASUS s533-mx, fx5200

MasterBlaster, 21-03-08 0:05.
MasterBlaster   
20-03-08, 23:46   #3 ( )
IO Member
 
   MasterBlaster
 
: Dec 2007
: 441


?
, ?
: char ,
: , '
char = ( ) .
:
public class Classname
}
(public static void main (String[] args
}
;"%"=char x

;(System.out.print("5"+x
{
{

.

Boolean (true or false). : (>,<,= ' ) :
public class Classname
}
(public static void main (String[] args
}
;Boolean x
;Int age= 21
X= age < 30
System.out.println("less then 30?"+x); //print
{
{
true 21 30 .

(: ):
==
..
!= ( : <>)
...
>
..
<
..
=>
.. ...
=<
... ..



.
?
. : (and) (or).
:
\ \ : & :

( main !!)

;Int age=16
;Int girlfriend = 15
;(Boolean unusual = (age < 21)&( girlfriend < 21

.

;Int age=16
;Int girlfriend = 15
;(Boolean unusual = (age < 21)&( girlfriend >21

.

:
\ \ : || ( ) :

;Int age=16
;Int girlfriend = 15
;(Boolean unusual = (age < 21)||( girlfriend > 21

.

;Int age=16
;Int girlfriend = 15
;(Boolean unusual = (age > 21)||( girlfriend > 21

.

:
;Int a=2
;Int b=5
;Int c= b*a

Boolean x= ((a==c)||(a>b))&((a==2*b)||(c==2*a+6)&(b<c)); //boolean
x ?


:
' :
( ) .
?! sun :\
? .

: final :
;Final double gate_dollar = 4.325
.

java

__________________
Cpu: Intel Core 2 Due E6600@2.4GHz
Motherboard: Gigabyte GA-965P-DS3
Memory: GSKILL 2GB DDRII 800MHZ DUAL CHANNEL
Video Card: Sapphire ATI 4850 512MB
Power Suplly: OCZ stealthXstream 600W
Monitor: 2 X LG L1953TR 19" LCD
Custom Built Water Cooling
htpc:
p4@1.8GHZ, 256mb ram, ASUS s533-mx, fx5200

MasterBlaster, 21-03-08 14:21.
MasterBlaster   
20-03-08, 23:47   #4 ( )
IO Addict
 
   Andrew
 
: Jan 2007
: 4,891
   SKype  Andrew

,

...
:]
__________________

Rig I | 2600K @ 4.5Ghz | DZ68DB | SSD 320 160GB | Mushkin 4Gbx2 | Seasonic MII-12 520W |


HTPC [XBMC 10.1] | E2160 @ 3Ghz | IP-35E | Gskill 1Gbx2 + 2Gb | HD2600 | Hec Silent Pro 375W |

Laptop | Dell Studio 1555 |

Phones | Nexus 4 | CM10.1@NightlyMod |
Andrew   
20-03-08, 23:47   #5 ( )
IO Member
 
   MasterBlaster
 
: Dec 2007
: 441


? 4 iuc , .

:=
' ? (main ) :

HTML:

  import java.io.InputStreamReader;
 import java.io.BufferedReader;
 import java.io.IOException;
 
 public class In {
     public static int requestInt(String message)
     {
         String str = getInput(message);
         if (str != "") {
             try {
                 return new Integer(str).intValue();
             }
 catch (Exception e) {
                 System.out.println("Invalid input");
             } 
        } 
         return 0; 
    } 
     public static double requestDouble(String message)
     {
         String str = getInput(message); 
        if (str != "") {
             try {
                 return new Double(str).doubleValue(); 
            }
 catch (Exception e) {
                 System.out.println("Invalid input");
             }
         }
         return 0.0;
     } 
     public static String requestString(String message)
     { 
        return getInput(message);
     } 
     private static String getInput(String message)
     { 
        String str = "";
         System.out.print(message);
         try {
             BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
             str = in.readLine();
         }
 catch (IOException e) {
             System.out.println("Invalid input");
         } 
        return str; 
    }
 } 


?
, In
( )

:
;Int x
X= In.requestInt("");\\input
?
In requestInt ,
requestDouble ( ), requestChar .


:
  1. , .
  2. , , .
  3. , , . 30, 50, 10. .


:
, , . :
45.019823 32.50928 3 .
?
:
System.out.println("");//print
:
;("")System.out.format


( ):


10 .
%10s
-s
5 .
%5.1f
-f
5 .
%5d
-d
%n
-n

:
;Double sum
;Double num1=45.019823
;Double num2=32.50928
;sum=num1*num2
;(System.out.format("sum= %7.3f",sum
?
, , 7 , 7 3 .
: 1463.562
.



__________________
Cpu: Intel Core 2 Due E6600@2.4GHz
Motherboard: Gigabyte GA-965P-DS3
Memory: GSKILL 2GB DDRII 800MHZ DUAL CHANNEL
Video Card: Sapphire ATI 4850 512MB
Power Suplly: OCZ stealthXstream 600W
Monitor: 2 X LG L1953TR 19" LCD
Custom Built Water Cooling
htpc:
p4@1.8GHZ, 256mb ram, ASUS s533-mx, fx5200

MasterBlaster, 22-03-08 18:18.
MasterBlaster   

« JAVA | . »



(?)
: http://www.iopanel.net/forum/thread11873.html
????| ??? ?? ???? - FXP.co.il Refback 01-06-11 23:14

JAVA IdanBS 8 20-03-08 23:09
Ch3MiCaL 3 16-03-08 19:50
Java? bamba12 11 15-10-07 21:17
, . Shay 21 22-04-07 21:22
: IdanBS 6 21-04-07 20:40


GMT +3. 14:30.





: vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
IOPanel.net