<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    blogjava's web log

    blogjava's web log
    ...

    面試題.net的


    A) In VB.Net, what is the method that is available without creating the instance of the class

    · 1. Instance method
    · 2. overloading method
    · 3. Shared method
    · 4. class methods

    Ans: ? 3 ??

    B) In VB.Net, what is finalise method and what are the role of it?
    · 1. Release object memory
    · 2. Release memory
    · 3. it calls when page is closed

    Ans: ?? 1 ?

    C) In VB.Net, passing an array using ByRef or ByVal makes a difference if you use a ReDim statement inside the called procedure.? Which array size will be affected ?
    · 1. an array passed by ByVal
    · 2. an array passed by ByRef
    · 3. both affected
    · 4. none affected

    Ans: ??? 3

    D) In VB.Net, ParamArray arguments are passed by in a function?
    · 1. Always by value
    · 2. Always by reference
    · 3. both
    · 4. none

    Ans: ? 2 ??

    E) How are parameters referenced by default in VB.Net?
    · 1. ByObject
    · 2. ByVal
    · 3. ByRef
    · 4. None

    Ans: ?? 2 ?

    F) Does ISDBNull() exsist in VB.Net?
    Select Answer:
    · 1. True ????? ?????? 2. False

    Ans: ? 1 ??

    G) In VB.Net, constructor is always
    · 1. sub new()
    · 2. constructor()
    · 3. base class()
    · 4. the class name itself

    Ans: ?? 1 ?

    H) In VB.NET, what is used to join strings
    · 1. Plus sign
    · 2. Ampersand
    · 3. both

    Ans: ?? 3 ?

    ?

    I) In Java, which statements ARE true?

    1.?????? When a thread sleeps, its locks are released

    2.?????? If a class has synchronized code, multiple threads can still access the non synchronized code.

    3.?????? Methods and variables can be protected from concurrent access problems by marking them with the synchronized keyword.

    4.?????? When a thread invokes wait(), its locks are released.

    5.?????? A static method cannot be synchronized

    Ans: ??? 2

    ?

    J) Which TWO combinations below consist (and only) the necessary classes in package java.io to read a single line of Traditional Chinese text via TCP connections?

    ? I. Socket

    ? II. TCPSocket

    ? III. PipedInputStream

    ? IV. BufferedInputStream

    ? V. BufferedReader

    ? VI. InputStreamReader

    ? VII. LineNumberReader

    ? VIII. StringReader

    ?

    1.?????? (I) + (III) + (VI) + (VII)

    2.?????? (I) + (IV) + (VI) + (V)

    3.?????? (II) + (VI) + (VII)

    4.?????? (I) + (IV) + (VI) + (VII)

    5.?????? (I) + (VI) + (VIII)

    Ans: ?? 2 ?


    ?

    Question 1

    ?

    The VB function, GetCurrencyCode demonstrates the translation between the currency code and currency number. ?However, the performance of this function is not good enough; the higher order of input number takes much more times to calculate. ?Please suggest a way to improve the program performance:

    ?

    Function GetCurrencyCode(ByVal input As String) As String

    If input = "01" Then

    return = "AFA"

    ElseIf input = "02" Then

    return = "ALL"

    ElseIf input = "03" Then

    return = "DZD"

    ElseIf input = "04" Then

    return = "USD"

    ElseIf input = "05" Then

    return = "HKD"

    ElseIf input = "75" Then

    return = "EUR"

    ElseIf input = "76" Then

    return = "XCD"

    ElseIf input = "77" Then

    return = "AMD"

    End If

    End Function

    ?

    Answer:

    ?


    Question 2

    ?

    Write a function that reverses the order of the words in a string. For instance, your function should transform the string “Do or do not, there is no try.” To “try. No is there not, do or Do”. Assume that all words are space delimited and treat punctuation the same as letters.

    ?

    Use your most hands-on programming language.

    ?

    Answer:

    ?


    Question 3

    ?

    Study the following VB program:

    ?

    Imports System

    Imports System.IO

    Module Module1

    Public ArtList As ArrayList

    End Module

    ?

    Public Class Form1

    Inherits System.Windows.Forms.Form

    ?

    #Region " Windows Form Designer generated code "

    #EndRegion

    ?

    <[Serializable]()> PublicClass Art

    Public Title AsString

    Public Des AsString

    Public Value AsInteger

    Public Price AsDouble

    Public Picture AsString

    End Class

    ?

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim myArt AsNewObject

    Dim hashtable AsNew Collections.Hashtable

    Dim key AsString

    ?

    Try

    myArt = New Art

    With myArt

    .Title = "Title"

    .Des = "Desc"

    .Value = 123

    .Price = 321.05

    End With

    key = myArt.Title & myArt.Des & CStr(myArt.Value) & CStr(myArt.Price)

    hashtable.Add(key, myArt)

    ArtList.Add(myArt)

    ?

    Catch ex As Exception 'This is the line 94’

    MsgBox(ex.Message & vbCrLf & ex.StackTrace)

    End Try

    End Sub

    End Class

    A form is created on which a button control is placed. ?When the Button1_Click is fired, a message box is popup:

    ?(圖片未上傳)

    ?

    What is the problem and how to fix it?

    ?

    Answer:

    ?


    Question 4

    ?

    In the following VB program, please states any potential problem(s) and how to correct.

    ?

    Private Sub btnCalc_Click( )

    Dim result As Integer

    Try

    Me.Cursor = Windows.Forms.Cursors.WaitCursor

    result = Convert.ToInt32(txtInput1.Text) / Convert.ToInt32(txtInput2.Text)

    txtResult.Text = result

    Me.Cursor = Windows.Forms.Cursors.Default

    Catch ex As Exception

    MsgBox(ex.StackTrace)

    Catch ex As ArgumentNullException

    MsgBox("Input Test box cannot be null.")

    Catch ex As OverflowException

    MsgBox("Input Test box 2 cannot be zero!")

    Catch ex As FormatException

    MsgBox("Input Test box should be numeric format!")

    End Try

    End Sub

    ?

    Answer:

    ?


    Question 5

    ?

    GetRecordset() is a VB function that returns a ADODB.Recordset object:

    ?

    ??????

    Ref_ID

    Qty

    Price

    Row 0

    00123

    1000

    60.50

    Row 1

    00123

    2000

    60.00

    Row 2

    00123

    3500

    59.50

    Row 3

    00124

    3000

    60.50

    Row 4

    00125

    2000

    59.50

    Row 5

    00125

    1000

    58.00

    ?

    ?(This recordset is sorted by Ref_ID)

    ?

    The following program

    ?

    Dim rst as ADODB.Recordset

    Rst = GetRecordset

    Do While Not rst.EOF

    Console.writeline(rst.Fields("Ref_ID") & vbcrlf & rst.Fields(" Qty ") & vbcrlf & rst.Fields(" Price "))

    rst.MoveNext()

    Loop

    ?

    Can generate the following output:

    ?

    Output:

    ?

    00123 1000 60.50

    00123 2000 60.00

    00123 3500 59.50

    00124 3000 60.50

    00125 2000 59.50

    00125 1000 58.00

    ?

    Please suggest how to modify the above program to generate the following output:

    ?

    Output:

    00123

    1000 ?? ?????? 60.50

    2000 ?? ?????? 60.00

    3500??????????? 59.50

    ---- ??????????? -----

    6500??????????? 60.00

    00124

    3000??????????? 60.50

    ---- ??????????? -----

    3000 ?? ?????? 60.50

    00125

    2000???? ?????? 59.50

    1000???? ?????? 58.00

    ---- ??????????? -----

    3000???? ?????? 58.75

    ?

    ?

    Answer:

    ?


    Question 6

    ?

    Problem: Use your most hands-on programming language to implement a function that prints all possible combinations of the characters in a string. These combinations range in length from one to the length of the string. Two combinations that differ only in ordering of the characters ARE the same combination.? In other words, “12” and “31” are different combinations from the input string “123”, but “21 is the same as “12”.

    ?

    For example, if we use “wxyz” as parameter for Combination(“wxyz”) the function will print out

    ?

    w

    x

    y

    z

    wx

    wy

    wz

    xy

    xz

    yz

    wxy

    wxz

    wyz

    xyz

    wxyz

    ?

    Answer:

    ?


    Question 7

    ?

    Module modFree

    #Region "clsShape"

    Public Class clsShape

    Private m_Area As Double

    Private m_Sides As Integer

    ?

    Public Sub New()

    m_Area = 0.0

    m_Sides = 0

    End Sub

    ?

    Public Sub New(ByVal Sides As Integer)

    m_Sides = Sides

    End Sub

    ?

    Public Sub New(ByVal Area As Double)

    m_Area = Area

    End Sub

    ?

    Public Sub New(ByVal Area As Double, ByVal Sides As Integer)

    m_Area = Area

    m_Sides = Sides

    End Sub

    ?

    Public Property Area() As Double

    Get

    Return m_Area

    End Get

    Set(ByVal Value As Double)

    m_Area = Value

    End Set

    End Property

    ?

    Public Property Sides() As Integer

    Get

    Return m_Sides

    End Get

    Set(ByVal Value As Integer)

    m_Sides = Value

    End Set

    End Property

    End Class

    #End Region

    ?

    ?

    #Region "clsTriangle"

    Public Class clsTriangle

    Inherits clsShape

    ?

    Public Sub New()

    MyBase.New(3)

    End Sub

    ?

    Public Sub New(ByVal Area As Double)

    MyBase.New(Area, 3)

    End Sub

    ?

    Public Function CalculateArea(ByVal SideBase As Double, ByVal Height As Double, _ Optional ByVal AssignToArea As Boolean = False) As Double

    Dim Area As Double = (SideBase * Height) / 2

    ?

    If AssignToArea Then

    Me.Area = Area

    End If

    ?

    Return Area

    End Function

    End Class

    #End Region

    ?

    Public Sub Main()

    Dim objTriangle As New clsTriangle

    Dim objShape As New clsShape

    ?

    objTriangle.Area = -330

    objTriangle.Sides = 5.5

    objTriangle.CalculateArea(10.0, 2.5)

    ?

    objShape.Area = 123

    objShape.Sides = -2

    objShape = CType(objShape, clsTriangle)

    ?

    Console.WriteLine(TypeOf objTriangle Is clsShape)

    Console.WriteLine(TypeOf objShape Is clsTriangle)

    Console.WriteLine(objTriangle.Area)

    End Sub

    End Module

    ?

    7.1 Please find the line of code from the procedure Main to cause run-time error.

    ?

    Answer:

    ?

    7.2 Please write the result output from the procedure Main.

    ?

    Answer:

    ?


    Question 8

    ?

    Consider the following account and customer tables:

    ?

    cust_tbl

    cust_id

    title

    e_first_name

    e_last_name

    address1

    .

    0

    MR

    Martin

    Ma

    .

    ?

    1

    MR

    Kirs

    Cheung

    .

    ?

    2

    MR

    Ricky

    Chan

    .

    ?

    3

    MR

    Tom

    Kwan

    .

    ?

    4

    MR

    Corporate Default

    Corporate Default

    .

    ?

    5

    MRS

    Mary

    Mok

    .

    ?

    .

    .

    .

    .

    .

    ?

    ?

    acc_grp_cust_tbl

    acc_group

    Cust_id1

    Cust_id2

    Cust_id3

    Cust_id4

    1400

    0

    1

    2

    ?

    1500

    3

    4

    ?

    ?

    1600

    5

    ?

    ?

    ?

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ?

    The acc_grp_cust_tbl table is responsible to store the customer ID, and the cust_tbl table is responsible to store customer personal information such as name, address, etc… Please write a SQL query in order to provide following result.

    ?

    ACC_GROUP

    PAYEENAMES

    1400

    Ma Martin/Cheung Kris/Chan Ricky

    1500

    Kwan Tom/Corporate Default Corporate Default

    1600

    Mok Mary

    .

    .

    .

    .

    ?

    Answer:

    ?


    posted on 2006-06-04 11:37 record java and net 閱讀(1419) 評論(3)  編輯  收藏 所屬分類: dot net相關

    評論

    # re: 第一輪面試題,搞.net的 2006-07-17 12:01 牛哥

    呵呵!有同感??!我直接放棄了!不想去了,想想以后還要去做VB。NET  回復  更多評論   

    # re: 第一輪面試題,搞.net的 2006-08-30 21:40

    第一題就答錯了,和java一樣是類方法!  回復  更多評論   

    # re: 第一輪面試題,搞.net的 2006-08-31 09:05 junmy

    A) In VB.Net, what is the method that is available without creating the instance of the class
    · 1. Instance method
    · 2. overloading method
    · 3. Shared method
    · 4. class methods

    這 個是類方法???


    老兄 你也太強了吧.

    3. Shared method 應該沒有錯吧.
      回復  更多評論   

    導航

    常用鏈接

    留言簿(44)

    新聞檔案

    2.動態(tài)語言

    3.工具箱

    9.文檔教程

    友情鏈接

    搜索

    最新評論

    主站蜘蛛池模板: 狠狠亚洲狠狠欧洲2019| 免费人妻无码不卡中文字幕系| 亚洲成AV人片在WWW| 亚洲中文字幕久久无码| 国产午夜亚洲精品国产| 亚洲国产午夜精品理论片在线播放 | 亚洲综合最新无码专区| 亚洲av麻豆aⅴ无码电影| 天天摸天天操免费播放小视频| 国产大片线上免费观看| 最近中文字幕mv免费高清视频7 | 男女交性无遮挡免费视频| 特黄aa级毛片免费视频播放| 又硬又粗又长又爽免费看| 成在线人视频免费视频| 九九美女网站免费| 亚州免费一级毛片| 大学生美女毛片免费视频| 国产国产成年年人免费看片| 亚洲另类激情专区小说图片| 亚洲午夜国产精品无码| 亚洲AV日韩精品久久久久久久 | 亚洲人成图片小说网站| 亚洲AV无码一区二区二三区软件| 亚洲国产综合91精品麻豆| 亚洲一级毛片在线观| 亚洲另类无码一区二区三区| 深夜特黄a级毛片免费播放| 9久热这里只有精品免费| 最近免费中文字幕大全免费版视频| 91免费播放人人爽人人快乐| 午夜影视在线免费观看| 亚洲国产免费综合| 久久精品国产亚洲香蕉| 亚洲人成网站看在线播放| 色哟哟国产精品免费观看| 久久免费看少妇高潮V片特黄| 日韩欧美一区二区三区免费观看| 国产又粗又猛又爽又黄的免费视频| 久久久精品国产亚洲成人满18免费网站 | 无码国产精品一区二区免费16|