+ Start a Discussion
N cN c 

how to add the custom label in an apex class without changing their functionality?

Hi Nar c,

Use the global variable $Label to access the Custom Label value in Visualforce page like below.
<apex:page standardController="Account" extensions="sample">
<h1>Example for Custom labels</h1>
<apex:outputLabel value="{!$Label.Sample}"/>
Custom labels are called in Apex using System.Label.Label_name.
String samp = System.Label.Sample;

Best Regards,
Shashikant SharmaShashikant Sharma
Not sure what exactly you mean without changing functionality but ot use Lables in apex class you only need.