Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Urgent! assessment tomorrow :(
New Posts  All Forums:Forum Nav:

Urgent! assessment tomorrow :(

post #1 of 4
Thread Starter 
Hi,

taking a basic java principles test tomorrow, need to know something I have forgotten.
when naming a class, what is 1) the rules you must follow and 2) the conventions you must follow

thanks!
Teh YayZors!
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k 4.3GHz Gigabyte GA-P67A-UD4-B3 (Revision) AMD 6950 [unlocked to 6970] G.Skill RipJaws X 4GB (2 x 2GB) 1600mhz + Kings... 
Hard DriveOptical DriveOSMonitor
OCZ 460A 120GB SSD + 1TB 2x Optical  Windows 7 64-bit | Ubuntu 15.10 24" Samsung SyncMaster BX2450 
PowerCase
Corsair HX850W Coolermaster CM690 II Advanced 
  hide details  
Reply
Teh YayZors!
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k 4.3GHz Gigabyte GA-P67A-UD4-B3 (Revision) AMD 6950 [unlocked to 6970] G.Skill RipJaws X 4GB (2 x 2GB) 1600mhz + Kings... 
Hard DriveOptical DriveOSMonitor
OCZ 460A 120GB SSD + 1TB 2x Optical  Windows 7 64-bit | Ubuntu 15.10 24" Samsung SyncMaster BX2450 
PowerCase
Corsair HX850W Coolermaster CM690 II Advanced 
  hide details  
Reply
post #2 of 4
example: public class Customer

Off the top of my head:

The name of the class should be capitalized and be meaningful to the actual content of the class (obviously). Don't use any reserved words for the class name. The word "class" needs to be all lowercase. Choose an appropriate access modifier for your class, i.e.(public, private, protected...etc).
Black Silence
(15 items)
 
  
CPUMotherboardRAMHard Drive
i5 3570k @ 4.5 GHz Asus P8Z77-M Pro Kingston HyperX Genesis 8 GB - 1600 MHz Seagate Barracuda 250 GB 
Optical DriveCoolingOSMonitor
Samsung WriteMaster Noctua NH-D14 Windows 10 ASUS VS24AH-P 
KeyboardPowerCaseMouse
Logitech Navigator Enermax Infiniti 650W Fractal R3 Black Pearl Razer Death Adder 
Mouse PadAudio
SteelSeries QcK Mass Altec Lansing FX4021 
  hide details  
Reply
Black Silence
(15 items)
 
  
CPUMotherboardRAMHard Drive
i5 3570k @ 4.5 GHz Asus P8Z77-M Pro Kingston HyperX Genesis 8 GB - 1600 MHz Seagate Barracuda 250 GB 
Optical DriveCoolingOSMonitor
Samsung WriteMaster Noctua NH-D14 Windows 10 ASUS VS24AH-P 
KeyboardPowerCaseMouse
Logitech Navigator Enermax Infiniti 650W Fractal R3 Black Pearl Razer Death Adder 
Mouse PadAudio
SteelSeries QcK Mass Altec Lansing FX4021 
  hide details  
Reply
post #3 of 4
Example
Code:
public class FactorialCalculator {

        public static void main(String[] args) {

        }//end main

}//end class

FactorialCalculator is the name of the class.
-Capitalize the letters of the words used (CamelCase)
-you must save your application with the exact same name of your class in order to compile
+to use the example I gave you must save the application as FactorialCalculator.java
-Name should reflect the type of application you have built (use nouns) (no plurals minus a few exceptions)

Just some things off the top of my head, I am sure others will add more.
Edited by Gnomepatrol - 5/7/12 at 11:44am
Gnomeon
(16 items)
 
GnomeBook Pro
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1245 V2 ASUS P8Z77-V SAPPHIRE TRI-X OC Radeon R9 290X 4GB  Crucial Ballistix Tactical 16GB DDR3 1866 
Hard DriveHard DriveCoolingOS
Crucial M550 256GB HGST Travelstar 7K1000 2.5-Inch 1TB 7200 RPM Cooler Master Hyper 212 Evo Windows 10 Pro 64-Bit 
MonitorKeyboardPowerCase
BenQ XL2730Z Cooler Master Quickfire Pro Unbranded (Tenkeyless) SeaSonic SG12 550W Fractal Design Define S 
MouseAudioAudioOther
Mionix Avior Swan M10 Philips Fidelio X1 Audio-Technica ATR2500-USB 
CPUMotherboardGraphicsRAM
Intel Core i7-2720QM Logic Board Intel HD Graphics 3000 and AMD 6750M 1gb Crucial 16GB 1333MHZ 
Hard DriveOptical DriveOSMonitor
750gb Hitachi 5400rpm 8x double-layer SuperDrive OS x 10.7.4 15.4" LED-backlit glossy widescreen display 144... 
KeyboardPowerCaseMouse
Apple Keyboard Apple 85W MagSafe Power Adapter 2011 Unibody Magic Trackpad 
Audio
Built-in Stereo Speakers with Subwoofer 
  hide details  
Reply
Gnomeon
(16 items)
 
GnomeBook Pro
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1245 V2 ASUS P8Z77-V SAPPHIRE TRI-X OC Radeon R9 290X 4GB  Crucial Ballistix Tactical 16GB DDR3 1866 
Hard DriveHard DriveCoolingOS
Crucial M550 256GB HGST Travelstar 7K1000 2.5-Inch 1TB 7200 RPM Cooler Master Hyper 212 Evo Windows 10 Pro 64-Bit 
MonitorKeyboardPowerCase
BenQ XL2730Z Cooler Master Quickfire Pro Unbranded (Tenkeyless) SeaSonic SG12 550W Fractal Design Define S 
MouseAudioAudioOther
Mionix Avior Swan M10 Philips Fidelio X1 Audio-Technica ATR2500-USB 
CPUMotherboardGraphicsRAM
Intel Core i7-2720QM Logic Board Intel HD Graphics 3000 and AMD 6750M 1gb Crucial 16GB 1333MHZ 
Hard DriveOptical DriveOSMonitor
750gb Hitachi 5400rpm 8x double-layer SuperDrive OS x 10.7.4 15.4" LED-backlit glossy widescreen display 144... 
KeyboardPowerCaseMouse
Apple Keyboard Apple 85W MagSafe Power Adapter 2011 Unibody Magic Trackpad 
Audio
Built-in Stereo Speakers with Subwoofer 
  hide details  
Reply
post #4 of 4
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Urgent! assessment tomorrow :(