Please answer for this question
public class Qcb90 {
int a;
int b;
public void f() {
a = 0;
b = 0;
int[] c = { 0 };
g(b, c);
System.out.println(a + " " + b + " " + c[0] + " ");
public void g(int b, int[] c) {
a = 1;
b = 1;
c[0] = 1;
public static void main(String[] args) {
Qcb90 obj = new Qcb90();
obj.f();
I answered 001 as o/p
But the o/p is 101
How can this be possible.
First I have to say: whoever wrote this code need some extensive lessons in HUMAN FRIENDY CODE. Use useful variables name other than one letter.
You have two methods:
Method f
And method g.
You have to global or public variables a and b.
Now, in the main method you call the first method f () which assigns zeros to the public variables a and b. it also creates a new array c[] with one slot containing the number 0;
After that, you call the method g. and pass both b and c[]. Notice that you have over ridden the values of b and c[] because you redefined them again in the header of the method
public void g(int b, int[] c)So now both b and c[] are not initialized and contain basically nothing.
Inside the g() method, you assign the public variable a with 1, and the ENTERNAL variable b with 1 (note that b now is not the same after it has been redefined again in the header of the g() method).
After this, you have printed the out put. a = 1, b = 0, c = 1.
Similar Messages
-
Not getting any straight answers for this question!!!!!
Hi All,
This question i've posted before, but i didn't get correct answer. I'm posting it again!!!!!
I'm very confused about the flow of process.
right now i'm working on webmethods. I did worked on lots of message types like 850, 810,856,832,940,997 in X12 and also EDIFACT.......for that past 2 1/2 years.
This question is completely related to SEEBURGER ADAPTER NOT ANY CONVERSION AGENT:
1.
when an EDI message comes into XI it will be converted into EDI-XML format bye seeburger adapter. where we get the prototype of EDI message? Do we have a package or namespace in repository from seeburger which gives all EDI prototypes? or we import as an XSD doc from our local system generated by 3rd party tools?
2.
Do we write a mapping program(EDI-XML 2 IDOC-XML) with graphical tool or do we have a tool provided by seeburger to write mapping program? I heard that seeburger provides mapping programs(not those modules which converts standard EDI to XML EDI) which will convert EDI XML 2 IDOC-XML. is this is true?
3.
how do we process EDI file sent by customer? is it ISA level or ST level? because there may be many situations where one ISA has multiple ST's.
Please explain me if possible with one scenario......i read all the links provided about this question so i need a practical example.........
Thanks in advance.Hi,
Go thru this might help you
http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf
http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
http://www.seeburger.com/fileadmin/com/pdf/SEEBURGER_SAP_Adapter_engl.pdf
http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf
http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt
http://www.sap.com/asia/company/events/nwtechdays/presentation/australia-slides/Pre-Built_Integration.pdf
Regards
Agasthuri Doss -
What is the answer for this question?
For a tree T, let nI denote the number of its internal nodes, and let nE denote the number of its external nodes. Show that if every internal node in T has exactly 3 children, then nE = 2 nI + 1.
Peter Lawrey wrote:
How does this question relate to Java Programming?Oh that's a whole unique class of posters here. The type that think "somewhere this touches Java, so it is a Java problem". Even if you are asking how to fix a bug in a piece of actionscript that is being called from a JSP, or a piece of CSS is misbehaving in IE7 which causes an applet to be displayed 10 pixels too far to the right. In this case the homework probably needs to be proven using a piece of Java code.
Hey, its convenient to ask such unrelated questions in a place where lots of people from different disciplines visit, right? SOMEONE must know the answer... -
Please answer to this questions..
Hi guys,
Need some clarification on these questions (one of my friend got to know this) I gave him some good ones but need clarifications
Hoping for good answers..
satisfactory answers best rewards..
1. Transaction Code to create a purchase order?
<b>I think it was ME21N do we have any transaction other than that.</b>
2. How to handle Table controls in BDC?
<b>Ans: I think ,Using the counter next to field like vbak-ebeln(i) was that correct, or there is any method to do that.</b>
3. When we create a BDC for Material Creation we have multiple views in creating for different type of products, when we do recording, we get code for only a particular views for the material will be used for creation that time, then how we will transfer data which has got different kind of views other than for which we don't have recording program?
4. If we Add a New text element to MEDRUCK in a page window, to trigger that text element we need to change the driver program or not?
5. Driver programs for MEDRUCK and RVINVOICE01?
6. How to add a field in a Standard Master table?
<b>Ans: I think we need an ACCESS KEY to change any data in Master tables</b>Hi,
Po create : ME21N
2. Table control in BDC e.g.:
BDC XK01 using Table control:
REPORT Y730_BDC5 .
*HANDLING TABLE CONTROL IN BDC
DATA : BEGIN OF IT_DUMMY OCCURS 0,
DUMMY(100) TYPE C,
END OF IT_DUMMY.
DATA : BEGIN OF IT_XK01 OCCURS 0,
LIFNR(10) TYPE C,
BUKRS(4) TYPE C,
EKORG(4) TYPE C,
KTOKK(4) TYPE C,
NAME1(30) TYPE C,
SORTL(10) TYPE C,
LAND1(3) TYPE C,
SPRAS(2) TYPE C,
AKONT(6) TYPE C,
FDGRV(2) TYPE C,
WAERS(3) TYPE C,
END OF IT_XK01,
BEGIN OF IT_BANK OCCURS 0,
BANKS(3) TYPE C,
BANKL(10) TYPE C,
BANKN(10) TYPE C,
KOINH(30) TYPE C,
LIFNR(10) TYPE C,
END OF IT_BANK.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = 'C:VENDOR.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = IT_DUMMY.
LOOP AT IT_DUMMY.
IF IT_DUMMY-DUMMY+0(2) = '11'.
IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
APPEND IT_XK01.
ELSE.
IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
APPEND IT_BANK.
ENDIF.
ENDLOOP.
LOOP AT IT_XK01.
REFRESH IT_BDCDATA.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-REF_LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
IT_XK01-LIFNR.
perform bdc_field using 'RF02K-BUKRS'
IT_XK01-BUKRS.
perform bdc_field using 'RF02K-EKORG'
IT_XK01-EKORG.
perform bdc_field using 'RF02K-KTOKK'
IT_XK01-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELX1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
IT_XK01-NAME1.
perform bdc_field using 'LFA1-SORTL'
IT_XK01-SORTL.
perform bdc_field using 'LFA1-LAND1'
IT_XK01-LAND1.
perform bdc_field using 'LFA1-SPRAS'
IT_XK01-SPRAS.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-KOINH(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
DATA : FNAM(20) TYPE C,
IDX TYPE C.
MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKS.
CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKL.
CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKN.
CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-KOINH.
IDX = IDX + 1.
ENDLOOP.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFB1-AKONT'
IT_XK01-AKONT.
perform bdc_field using 'LFB1-FDGRV'
IT_XK01-FDGRV.
perform bdc_dynpro using 'SAPMF02K' '0215'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0220'.
perform bdc_field using 'BDC_CURSOR'
'LFB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFM1-WAERS'
IT_XK01-WAERS.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'WYT3-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'XK01' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.
FORM BDC_DYNPRO USING PROG SCR.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROG.
IT_BDCDATA-DYNPRO = SCR.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM.
3. ---
4. that text elemnt must be populated in driver program OR we can defind it in script as /:DEFINE var... command.
5. yes
6. using append structue or include through table exit.
Jogdand M B -
Hi to everybody
I have a t-code AC01 service purchase request number..
In that , I have a field "LONG TEXT"...
if i enter some data into the Long Text, it directly goes to the database ,
so How to know the Database-Table and the field...
Can you tell me the ways to find out the database table and the field....hi,
long text doesnt have any field, place where u enter long text in ac01 ,above it there is t symbol, just double click it it takes u to script editor, its shows u text id,
language, tdname,object.
u had to pass this parametrs in to function module read_text to retrive, other wise, create_text to upload,
check this tables
The text is stored in table STXH/STXL
Keys:
TDID = 'LTXT'
TDPRAS = <language>
TDNAME = nr of the service
TDOBJECT = 'ASMD'.
check this code for uploading long text.
DATA: BEGIN OF itab OCCURS 0,
asnum LIKE asmd-asnum, " Service No
text(5000) TYPE c, " Long Text
END OF itab.
*DATA: itab1 LIKE itab OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF itab1 OCCURS 0,
asnum LIKE asmd-asnum, " Service No
sequ type i, " Text Sequence
text(5000) TYPE c, " Long Text
END OF itab1.
To create Long Text lines for CREATE_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for CREATE_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras. " Language
Constants
Object ID for Long Text of Service Master
CONSTANTS:c_best TYPE thead-tdid VALUE 'LTXT',
c_material TYPE thead-tdobject VALUE 'ASMD'. " Object
for file splitting.
DATA: start TYPE i,
len TYPE i VALUE 92,
totlen TYPE i,
n TYPE i.
PARAMETERS p_file LIKE rlgrap-filename."input file
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start Of Selection
START-OF-SELECTION.
*To Upload Flat file
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = itab
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
LOOP AT itab.
itab1-asnum = itab-asnum.
CLEAR: totlen,n, start.
totlen = STRLEN( itab-text ).
n = totlen / len.
n = n + 1.
DO n TIMES.
itab1-text = itab-text+start(len).
itab1-sequ = sy-index.
start = start + len.
APPEND itab1.
ENDDO.
ENDLOOP.
delete itab1 where text is initial.
SORT itab1 BY asnum sequ.
LOOP AT itab1.
dt_lines-tdformat = '*'.
dt_lines-tdline = itab1-text.
APPEND dt_lines.
Call the Function Module to Create Text
AT END OF asnum.
dl_lan = sy-langu.
WRITE : / itab-asnum.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = itab1-asnum
IMPORTING
output = itab1-asnum.
MOVE itab1-asnum TO dl_name.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = c_best
flanguage = dl_lan
fname = dl_name
fobject = c_material
save_direct = 'X'
fformat = '*'
TABLES
flines = dt_lines
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Long Text Creation failed for Service No'(001),
itab1-asnum.
ELSE.
WRITE:/ 'Long Text Created Successfully for Service No'(002),
itab1-asnum.
ENDIF.
REFRESH dt_lines.
ENDAT.
ENDLOOP.
regards
siva. -
pl. answer this
Which clause excludes the group function?
a. WHERE
b. FROM
c. HAVING
d. GROUP BY
e. ORDER BYpl. answer this
Which clause excludes the group function?
a. WHERE
b. FROM
c. HAVING
d. GROUP BY
e. ORDER BYYour question doesn't make sense.
Excludes = To do away with, ignore, make solitary.
None of the above answers prevents you from having a GROUP BY in your query as well. It's possible to have a statement that contains ALL of those elements.
You need to clarify the question and say if the question is in the context of a previous question or example piece of SQL etc. -
WILL SOMEONE PLEASE TELL ME HOW I CAN ACCESS MY ITUNES CREDIT DOLLARS TO BUY A LIFE FOR CANDY CRUSH???
There is no need to shout.
What happens when you to try to buy it ? If you have a balance on your account then that should be automatically used, you can't/don't need to specify how it's charged. -
I am betting that Shane has the best answer for this question.
I am a long time user of Final Cut. Recently I worked on my first project using AVID and was very mystified. They said they capture at 15/1 ratio and it seems to be about 31 mbps. So if they were capturing at a 1/1 ratio, that just seems like a very large file for just one minute of footage. Am I crazy or doesn't Final Cut give you a better quality video for far less storage space?
They said they capture at 15/1 ratio and it seems to be about 31 mbps.
Yes, that is an "offline" resolution. Like Offline RT is in FCP, or ProRes Proxy. Good only to see what you are cutting. You recapture at full resolution later. This is the very typical and standard Avid workflow that has worked well for decades.
So if they were capturing at a 1/1 ratio, that just seems like a very large file for just one minute of footage.
Yes....1:1 is comparable to Uncompressed 10 bit in FCP, which also produces very large media files. Avid also has a DV codec, for capturing DV material, and that is comparable to FCPs DV codec. Lossless, yet small, because they are native DV codecs.
Am I crazy or doesn't Final Cut give you a better quality video for far less storage space?
You are crazy. As JIm said, there are many different flavors of codecs. Avid's 1:1 is comparable to FCP's Uncompressed 10-bit. Avid DV is FCP DV. Avid's DNxHD, the preferred codec of choice now, was revolutionary as it gave 1:1 quality at much smaller file sizes. FCP follows suit with ProRes...full uncompressed quality, smaller file size.
Shane -
Please reply for this question
Is it possible to have more than two classes in a single java source file?
The only one that can have
a "public" modifier in its class signature is the one
with the 'main' method in it.No, that's not true.
You can only have one top-level public class per file, and it must have the same name as the file. It does not have to have a main method. You can also have multiple public nested classes in the same file. -
please enter at most 70 letters or numbers for street address, i am facing this issue with that i am unable to downloads few apps, as it is asking for this question and again and again,
i tried all letters and address more 100 hundred also nut no of use,please enter at most 70 letters or numbers for street address, i am facing this issue with that i am unable to downloads few apps, as it is asking for this question and again and again,
i tried all letters and address more 100 hundred also nut no of use, -
This is my first use of this program. How do I remove a page break? How do line up my drop down box along side the text box on the left of it? The drop down is for a multiple choice answer for the question to the left of each drop down.
See McAfee support to find out how to disable that McAfee feature - that isn't part of the normal Firefox installation.
-
Thanks, the write-up was informative, But it do not answer for my question, that is where to look for serial # on my Macbook Pro Mid 2010 White Unibody Core 2 Duo 2.4 GHz 13.3"? Its not on bottom-case and the above article does not mention this model?
Click on the Apple and then on about this Mac. In the new window, click on the "version 10.9.2" until you see the serial number displayed.
-
I forgot the answer for security questions, I don't know how to recover my account.
Please help me. Thank you.Also my computer wont let me get on icloud.
-
hello please help me in my problem in apple id, i cannot connect to my ipad mini in itune store and app store because they find me a credit card but i dont have credit card. what can i do now? i need an answer for this problem. thank you
I would suggest that you buy a visa or mastercard gift card and put a few dollars on it and use it to access the store. Just add money to it before you want to buy something from the store and it will act like a normal credit card for you.
-
hi, sometimes big images could not open with photoshop.ı can open with windows but cant open photoshop.if ı try to open i am seeing a white image.is there any answer for this problem please.
Just to assist those who might help you with this, please give the exact version of Photoshop CS6 you are running, for instance CS6 13.0.1.3.
I had already asked for that in my previous post, but I guess you didn't quite know what I was referencing when I typed "exact version".
Sorry, I cannot help you myself because I don't deal with that kind of 3D images, don't use Windows, and in all frankness I'm not quite following your last post.
Also please give the exact model of your graphics card, so they can check whether it is on the list of cards tested by Adobe.
Thank you.
Maybe you are looking for
-
PDFs that can be filled in and returned
Firstly I apologise if I have not searched enough to find the answer to this question but I have tried and I need to purchase the correct Adobe Product for what I require. I work in the Health Industry and my job entails sending Forms currently in WO
-
Is there an Oracle-recommended tool to customize eBS standard reports?
Hi, a few days ago a collegue of mine dropped in and asked for a tool to customize eBusinessSuite (R12) standard reports. He came along with XXBA_PO_STANDARD_XSLFO.xsl (which is a mix of XSL and FO) and asked me if I could modify the position of some
-
Can't run dangerdeep / symbol lookup error
I just wanted to try out danger from the deep but the game doesn't run. I installed dangerdeep and dangerdeep-data 0.3.0 out of the community repo. The game menu starts fine but as soon as I want to start a mission the game crashes: dangerdeep: symbo
-
Magic mouse driver for windows 7
Hi Guys, Im running windows 7 (64 bit) from bootcamp on my macbook (late 2008 aluminum). I have had a few error messages from windows telling my that W764 doesn't support this notebook but I have nevertheless managed to work quite comfortably on this
-
How to prepare a query for this validation
I am supposed to implement the below validation using query: retrieve emp_no from employee table where emp_desgn='MANAGER' and emp_status='OFFSHORE' 1. if the emp_no exists display emp_first_name,emp_last_name,emp_remarks. 2. if the emp_no doesn't ex